From e7a7a30c5927d8fa4cc057923607c3dfe297cba6 Mon Sep 17 00:00:00 2001 From: Marcus Lagergren <1062473+lagergren@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:18:01 +0100 Subject: [PATCH] Now we can just do ./gradlew run, and it will provide identical functionality as before the plugin port. --- .gitignore | 42 ++++++++++++++++++++-------- build.gradle.kts | 56 +++++++++++++------------------------ gradle.properties | 2 +- gradle/libs.versions.toml | 2 +- platformUI/gui/package.json | 2 +- platformUI/gui/yarn.lock | 8 +++--- 6 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.gitignore b/.gitignore index e1c5f79..6096497 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -# Logs and databases # -###################### +# +# Logs and databases +# *.log *.out *.tmp @@ -7,8 +8,9 @@ *.sql *.sqlite +# # OS generated files # -###################### +# .DS_Store .DS_Store? ._* @@ -17,20 +19,36 @@ ehthumbs.db Thumbs.db -# build directory # -################### +# +# Build directories +# build/ + +# +# Module aggregation directory: +# +# While we can still collect everyting into a common lib folder, as a final build step, +# if we want, the 'standard' Maven style way would be to just build and run the project. +# Every component declaratively states its dependencies to build and/or run, and any +# task using these dependencies gets them lazily resolved, and exactly what it needs, +# nothing more. We will likely implement a distribution config for XTC applications +# like this, of course, so that the old "lib" folder is some kind of versioned +# publishable artifact) +# lib/ -# xdk directory # -################### +# +# XDK directory +# xdk/ -# user-specific project files # -############################### +# +# User-specific project files +# prj/ .idea/ -# Gradle-specific project files # -################################# -.gradle \ No newline at end of file +# +# Gradle caches +# +.gradle diff --git a/build.gradle.kts b/build.gradle.kts index ebd0df3..67670aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,25 +9,25 @@ plugins { dependencies { xdkZip(libs.xdk) xtcModule(project(":kernel")) + xtcModule(project(":common")) // runtime path + xtcModule(project(":platformDB")) // runtime path + xtcModule(project(":host")) // runtime path + xtcModule(project(":platformUI")) // runtime path } -fun readPassword(): String { - val password = findProperty("org.xtclang.platform.password")?.toString() ?: "" - if (password.isEmpty()) { - throw GradleException("Error. No password was given.") - } - logger.lifecycle("Resolved password: [REDACTED]") - return password -} +//x/ec -L lib/ kernel.xtc [password]") -// The xtcRun plugin will give us runXtc tasks, where -// it's just runXtc for the main source set +/* + * xtcRun is a configuration for anything launching from the main source set. + * xtcRunTest + */ xtcRun { verbose = true - // needs a password property module { moduleName = "kernel" - args(readPassword()) + // TOOD: Check that grabbing properties through -P or -D or System.getenv works and maps to XTC properties. + // TODO: Implement arg() and args() syntactic sugar + args = listOf(readPassword()) } } @@ -35,8 +35,6 @@ val runXtc by tasks.existing { dependsOn(tasks.build) } -//println("Please run the platform directly using the following command:") -//println(" xec -L lib/ kernel.xtc [password]") val run by tasks.registering { group = "application" description = "Build (if necessary) and run the platform (equivalent to 'xec [-L ]+ kernel.xtc )" @@ -46,27 +44,11 @@ val run by tasks.registering { } } -/* -val libDir = "${projectDir}/lib" -val build = tasks.register("build") { - group = "Build" - description = "Build all" - - dependsOn(project(":kernel") .tasks["build"]) - dependsOn(project(":host") .tasks["build"]) - dependsOn(project(":platformDB").tasks["build"]) - dependsOn(project(":platformUI").tasks["build"]) -} - -tasks.register("run") { - group = "Run" - description = "Run the platform" - - dependsOn(build) - - doLast { - println("Please run the platform directly using the following command:") - println(" xec -L lib/ kernel.xtc [password]") +internal fun readPassword(): String { + val password = findProperty("org.xtclang.platform.password")?.toString() ?: "" + if (password.isEmpty()) { + throw GradleException("Error. No password was given.") } -} -*/ + logger.lifecycle("Resolved password: [REDACTED]") + return password +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 0635314..6811c1a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group=platform.xqiz.it version=0.1.0 -xtcVersion=0.4.41 +xtcVersion=0.4.44 # NOTE: This property would not live inside your repository for a production case, but # should be passed through a Gradle command line property "-Porg.xtclang.platform.password=>", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 69941e9..959ad80 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ node = "7.0.1" npm = "10.2.0" yarn = "1.22.21" -xdk = "0.4.41" +xdk = "0.4.44" tasktree = "2.1.1" [plugins] diff --git a/platformUI/gui/package.json b/platformUI/gui/package.json index 5df088e..0d916cf 100644 --- a/platformUI/gui/package.json +++ b/platformUI/gui/package.json @@ -17,7 +17,7 @@ "@quasar/extras": "^1.16.4", "axios": "^1.2.1", "pinia": "^2.0.11", - "quasar": "^2.14.1", + "quasar": "^2.14.2", "vue": "^3.0.0", "vue-router": "^4.0.0" }, diff --git a/platformUI/gui/yarn.lock b/platformUI/gui/yarn.lock index 9dcc122..10a1597 100644 --- a/platformUI/gui/yarn.lock +++ b/platformUI/gui/yarn.lock @@ -2919,10 +2919,10 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -quasar@^2.14.1: - version "2.14.1" - resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.14.1.tgz#3681cca0aff98b8eb5214b00c69dfdfcce58dfc9" - integrity sha512-TAIGUgHASlL7COS9qqfDKyV2+WGFcHQseIDTzN+yfXaXY5gn/FZqwkEnb87bgOqgGYw8KJerkfZg3aSel+bLPw== +quasar@^2.14.2: + version "2.14.2" + resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.14.2.tgz#794d8434eb449549fc8455aaec9bc14b71a57c98" + integrity sha512-f5KliWtM5BEuFsDU4yvuP+dlVIWZNrGu5VpWFsxzjpoykcP4B2HIOUiCl3mx2NCqERHd4Ts0aeioRkt9TTeExA== queue-microtask@^1.2.2: version "1.2.3"