From 858bb91c666b83e39eb88a34cf9999e43953b93e Mon Sep 17 00:00:00 2001 From: Sascha Lisson Date: Wed, 23 Oct 2024 09:44:53 +0200 Subject: [PATCH] build(deps): modelix.core -> 9.1.1, kotlin -> 2.1.0-Beta2 Kotlin 2.0.21, which is used by modelix.core 9.1.1 seems to be buggy. Kotlin 2.1.0 fixes that. --- build.gradle.kts | 16 ++++++++++++++-- gradle/libs.versions.toml | 6 +++++- kernelf-editor/build.gradle.kts | 2 ++ parser/build.gradle.kts | 2 +- .../build.gradle.kts | 6 ++++-- projectional-editor-ssr-client/build.gradle.kts | 2 +- projectional-editor-ssr-common/build.gradle.kts | 2 +- projectional-editor/build.gradle.kts | 2 +- react-ssr-server/build.gradle.kts | 2 +- 9 files changed, 30 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9b7f1310..7beae428 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,9 +18,10 @@ plugins { `maven-publish` id("com.palantir.git-version") version "3.1.0" id("com.dorongold.task-tree") version "4.0.0" - alias(coreLibs.plugins.kotlin.multiplatform) apply false - alias(coreLibs.plugins.kotlin.serialization) apply false + alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.kotlin.serialization) apply false id("org.jetbrains.intellij") version "1.17.4" apply false + alias(libs.plugins.npm.publish) apply false } group = "org.modelix" @@ -136,3 +137,14 @@ rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlu } copyMps() + +// make all 'packJsPackage' tasks depend on all 'kotlinNodeJsSetup' tasks, because gradle complained about this being missing +tasks.register("setupNodeEverywhere") { + dependsOn(":kernelf-apigen:kotlinNodeJsSetup") + dependsOn(":kernelf-editor:kotlinNodeJsSetup") + dependsOn(":parser:kotlinNodeJsSetup") + dependsOn(":projectional-editor:kotlinNodeJsSetup") + dependsOn(":projectional-editor-ssr-client:kotlinNodeJsSetup") + dependsOn(":projectional-editor-ssr-client-lib:kotlinNodeJsSetup") + dependsOn(":projectional-editor-ssr-common:kotlinNodeJsSetup") +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d5dfa943..4263b3d6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,10 +4,14 @@ modelix-model-api-gen = { id = "org.modelix.model-api-gen", version.ref = "modelixCore" } npm-publish = { id = "dev.petuska.npm.publish", version = "3.4.2" } modelix-mps-buildtools = { id = "org.modelix.mps.build-tools", version.ref = "modelixBuildtools" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } [versions] -modelixCore = "8.16.1" +modelixCore = "9.1.1" modelixBuildtools="1.7.3" +kotlin = "2.1.0-Beta2" [libraries] modelix-model-api = { group = "org.modelix", name = "model-api", version.ref = "modelixCore" } diff --git a/kernelf-editor/build.gradle.kts b/kernelf-editor/build.gradle.kts index 1603dd63..514ca310 100644 --- a/kernelf-editor/build.gradle.kts +++ b/kernelf-editor/build.gradle.kts @@ -216,3 +216,5 @@ tasks.named("packJsPackage") { .copyTo(packagesDir.resolve("modelix-kernelf-editor.tgz"), overwrite = true) } } + +tasks.named("packJsPackage") { dependsOn(":setupNodeEverywhere") } diff --git a/parser/build.gradle.kts b/parser/build.gradle.kts index 214e6213..dc0968f4 100644 --- a/parser/build.gradle.kts +++ b/parser/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") - alias(coreLibs.plugins.kotlin.serialization) + kotlin("plugin.serialization") `maven-publish` } diff --git a/projectional-editor-ssr-client-lib/build.gradle.kts b/projectional-editor-ssr-client-lib/build.gradle.kts index b01f1029..a2050315 100644 --- a/projectional-editor-ssr-client-lib/build.gradle.kts +++ b/projectional-editor-ssr-client-lib/build.gradle.kts @@ -1,9 +1,9 @@ import dev.petuska.npm.publish.task.NpmPackTask plugins { - alias(coreLibs.plugins.kotlin.multiplatform) + kotlin("multiplatform") `maven-publish` - alias(coreLibs.plugins.npm.publish) + alias(libs.plugins.npm.publish) } kotlin { @@ -70,3 +70,5 @@ tasks.register("packageWithoutVersion", Copy::class.java) { from(tasks.named("packJsPackage", NpmPackTask::class.java).map { it.outputFile }) into(project.layout.buildDirectory.dir("packages")).rename { "${project.name}.tgz" } } + +tasks.named("packJsPackage") { dependsOn(":setupNodeEverywhere") } diff --git a/projectional-editor-ssr-client/build.gradle.kts b/projectional-editor-ssr-client/build.gradle.kts index f1b52d73..2f14e000 100644 --- a/projectional-editor-ssr-client/build.gradle.kts +++ b/projectional-editor-ssr-client/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - alias(coreLibs.plugins.kotlin.multiplatform) + kotlin("multiplatform") `maven-publish` } diff --git a/projectional-editor-ssr-common/build.gradle.kts b/projectional-editor-ssr-common/build.gradle.kts index 470a502b..05b5d32d 100644 --- a/projectional-editor-ssr-common/build.gradle.kts +++ b/projectional-editor-ssr-common/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") - alias(coreLibs.plugins.kotlin.serialization) + kotlin("plugin.serialization") `maven-publish` } diff --git a/projectional-editor/build.gradle.kts b/projectional-editor/build.gradle.kts index da2a00fb..7888d34f 100644 --- a/projectional-editor/build.gradle.kts +++ b/projectional-editor/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") - alias(coreLibs.plugins.kotlin.serialization) + kotlin("plugin.serialization") `maven-publish` } diff --git a/react-ssr-server/build.gradle.kts b/react-ssr-server/build.gradle.kts index 2e50b979..1c10fda8 100644 --- a/react-ssr-server/build.gradle.kts +++ b/react-ssr-server/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") - alias(coreLibs.plugins.kotlin.serialization) + kotlin("plugin.serialization") `maven-publish` }