diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml index 74dbf59..a84df7d 100644 --- a/gradle/common.versions.toml +++ b/gradle/common.versions.toml @@ -5,7 +5,7 @@ [versions] # https://kotlinlang.org/docs/releases.html#release-details -kotlin = "2.1.21" +kotlin = "2.2.0" # https://github.com/JetBrains/compose-multiplatform/releases compose = "1.8.0" @@ -15,7 +15,7 @@ kotest = "5.9.1" kotest-plugin = "6.0.0.M3" # https://github.com/infix-de/testBalloon/releases -testBalloon = "0.3.3-K2.1.21" +testBalloon = "0.3.3-K2.2.0-RC" # https://gitlab.com/opensavvy/groundwork/pedestal/-/releases pedestal = "3.0.0-rc.1" -- 2.51.2 From 5ab931f6db55867facc947aad483f2bf15998dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Mon, 23 Jun 2025 17:18:24 +0200 Subject: [PATCH 02/15] upgrade: Compose 1.8.2 --- gradle/common.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml index a84df7d..8e9c91e 100644 --- a/gradle/common.versions.toml +++ b/gradle/common.versions.toml @@ -8,7 +8,7 @@ kotlin = "2.2.0" # https://github.com/JetBrains/compose-multiplatform/releases -compose = "1.8.0" +compose = "1.8.2" # https://github.com/kotest/kotest/releases kotest = "5.9.1" -- 2.51.2 From a4063e29adc8cd2973d16aa3b4d4645139f3bf78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Mon, 23 Jun 2025 17:18:42 +0200 Subject: [PATCH 03/15] upgrade: Kotest 6.0.0.M4 --- gradle/common.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml index 8e9c91e..c29c315 100644 --- a/gradle/common.versions.toml +++ b/gradle/common.versions.toml @@ -12,7 +12,7 @@ compose = "1.8.2" # https://github.com/kotest/kotest/releases kotest = "5.9.1" -kotest-plugin = "6.0.0.M3" +kotest-plugin = "6.0.0.M4" # https://github.com/infix-de/testBalloon/releases testBalloon = "0.3.3-K2.2.0-RC" -- 2.51.2 From 43fac36253283c4ea54d043f1f77573eec6a7e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Mon, 23 Jun 2025 17:19:04 +0200 Subject: [PATCH 04/15] upgrade: Pedestal 3.0.0 --- gradle/common.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml index c29c315..95c4347 100644 --- a/gradle/common.versions.toml +++ b/gradle/common.versions.toml @@ -18,7 +18,7 @@ kotest-plugin = "6.0.0.M4" testBalloon = "0.3.3-K2.2.0-RC" # https://gitlab.com/opensavvy/groundwork/pedestal/-/releases -pedestal = "3.0.0-rc.1" +pedestal = "3.0.0" # https://opensavvy.gitlab.io/groundwork/prepared/docs/news prepared = "2.0.6" -- 2.51.2 From ac18127c807a8af71400c137f958f85ed887cf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Tue, 24 Jun 2025 09:18:08 +0200 Subject: [PATCH 05/15] upgrade: TestBalloon 0.3.3 --- gradle/common.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml index 95c4347..bdd5450 100644 --- a/gradle/common.versions.toml +++ b/gradle/common.versions.toml @@ -15,7 +15,7 @@ kotest = "5.9.1" kotest-plugin = "6.0.0.M4" # https://github.com/infix-de/testBalloon/releases -testBalloon = "0.3.3-K2.2.0-RC" +testBalloon = "0.3.3-K2.2.0" # https://gitlab.com/opensavvy/groundwork/pedestal/-/releases pedestal = "3.0.0" -- 2.51.2 From cfabec7310d535d5fc6e597aef4c532c1e8a44f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 12 Jul 2025 22:32:14 +0200 Subject: [PATCH 06/15] build(gradle): Switch from Yarn to NPM for KotlinJS dependencies Lately, we have had more and more failed builds due to corrupted JS archives. For example: ``` error https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/usr/local/share/.cache/yarn/v6/npm-glob-7.2.3-b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b-integrity/node_modules/glob/README.md'" error https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, chmod '/usr/local/share/.cache/yarn/v6/npm-fsevents-2.3.3-cac6407785d03675a2a5e1a5305c697b347d90d6-integrity/node_modules/fsevents/fsevents.node'" ``` These archives are downloaded from registry.yarnpkg.com and not from NPM directly. We suspect the YarnPKG repository is bugged. By switching to NPM, we hope that it will decrease the number of such issues. The same problem was noticed by Robert Jaros on GitHub runners. See https://kotlinlang.slack.com/archives/C0B8L3U69/p1752345024357449 --- gradle.properties | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gradle.properties b/gradle.properties index 0422549..ae5101d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,6 +32,12 @@ org.gradle.daemon.idletimeout=2700000 # See https://kotl.in/dokka-gradle-migration org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled +# Use NPM instead of Yarn to download KotlinJS dependencies. +# The Kotlin team is planning on making NPM the default in the future. +# We are having issues with corrupted Yarn packages, so we're making the change in advance. +# See https://kotlinlang.org/docs/js-project-setup.html#npm-dependencies +kotlin.js.yarn=false + # System resource usage org.gradle.jvmargs=-Xmx3g -Xms200m -XX:MaxMetaspaceSize=512m -XX:+UseCompressedOops -XX:+UseG1GC -XX:NewRatio=3 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:G1PeriodicGCInterval=60000 -XX:-G1PeriodicGCInvokesConcurrent kotlin.daemon.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:NewRatio=2 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=40 -XX:G1PeriodicGCInterval=30000 -XX:-G1PeriodicGCInvokesConcurrent -- 2.51.2 From 519ff0209a17dac79e55b793c5b4efda0be62fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 5 Jul 2025 20:32:05 +0200 Subject: [PATCH 07/15] upgrade: OpenSavvy Conventions 2.1.1 --- gradle/conventions/settings.gradle.kts | 2 +- settings.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/conventions/settings.gradle.kts b/gradle/conventions/settings.gradle.kts index 921dc0d..4898048 100644 --- a/gradle/conventions/settings.gradle.kts +++ b/gradle/conventions/settings.gradle.kts @@ -48,7 +48,7 @@ pluginManagement { } plugins { - id("dev.opensavvy.conventions.settings") version "2.0.1" + id("dev.opensavvy.conventions.settings") version "2.1.1" } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/settings.gradle.kts b/settings.gradle.kts index f4b0fc0..79a83f8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -55,7 +55,7 @@ pluginManagement { } plugins { - id("dev.opensavvy.conventions.settings") version "2.0.1" + id("dev.opensavvy.conventions.settings") version "2.1.1" } include( -- 2.51.2 From 043cc9ca0093954dd763341964b2af5efb7e75b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 5 Jul 2025 22:17:55 +0200 Subject: [PATCH 08/15] build(gradle): Cross-compile Kotlin Native targets --- gradle.properties | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gradle.properties b/gradle.properties index ae5101d..83c5565 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,6 +22,12 @@ org.gradle.caching=true # See https://docs.gradle.org/current/userguide/multi_project_configuration_and_execution.html#sec:configuration_on_demand org.gradle.configureondemand=true +# Enables cross-compilation for Kotlin Multiplatform. +# This device will attempt to compile all configured Kotlin Native platforms, +# even if it is unable to execute them. +# See https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-publish-lib-setup.html#host-requirements +kotlin.native.enableKlibsCrossCompilation=true + # The Gradle daemon shuts down automatically if no tasks are executed in 30 minutes. # Default: 3h. # See https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties -- 2.51.2 From a1e0bfb4254fe2bb16e2e1eb45285abc1096b820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 5 Jul 2025 22:21:34 +0200 Subject: [PATCH 09/15] ci(gitlab): Allow publishing on the GitLab registry on-demand in merge requests --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55074cc..cc8b7a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,6 +167,7 @@ publish-maven:gitlab: when: never - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG + - when: manual publish-maven:gitlab[ios]: extends: [ .kotlin-native-iosArm64 ] @@ -198,6 +199,7 @@ publish-maven:gitlab[ios]: when: never - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG + - when: manual publish-maven:central:initialize: extends: [ .kotlin-jvm ] -- 2.51.2 From 58f4028ac6d431aca31ac7031f28aa76704df24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 5 Jul 2025 22:22:11 +0200 Subject: [PATCH 10/15] ci(gitlab): Remove GitLab registry iOS publishing, as the Linux host is now able to cross-compile iOS targets --- .gitlab-ci.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc8b7a3..5e6b500 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -158,7 +158,6 @@ publish-maven:gitlab: script: - > ./gradlew publishAllPublicationsToGitLabRepository - --no-configuration-cache -PappVersion=$project_version interruptible: false @@ -169,38 +168,6 @@ publish-maven:gitlab: - if: $CI_COMMIT_TAG - when: manual -publish-maven:gitlab[ios]: - extends: [ .kotlin-native-iosArm64 ] - needs: - - os.version - stage: deploy - - script: - - > - ./gradlew - publishIosArm64PublicationToGitLabRepository - publishIosSimulatorArm64PublicationToGitLabRepository - publishIosX64PublicationToGitLabRepository - publishMacosX64PublicationToGitLabRepository - publishMacosArm64PublicationToGitLabRepository - publishWatchosX64PublicationToGitLabRepository - publishWatchosArm32PublicationToGitLabRepository - publishWatchosArm64PublicationToGitLabRepository - publishWatchosSimulatorArm64PublicationToGitLabRepository - publishTvosX64PublicationToGitLabRepository - publishTvosArm64PublicationToGitLabRepository - publishTvosSimulatorArm64PublicationToGitLabRepository - --no-configuration-cache - -PappVersion=$project_version - - interruptible: false - rules: - - if: $PUBLISH_MAVEN == "no" || $PUBLISH_MAVEN_GITLAB == "no" || $PUBLISH_MAVEN_IOS == "no" - when: never - - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - - if: $CI_COMMIT_TAG - - when: manual - publish-maven:central:initialize: extends: [ .kotlin-jvm ] needs: -- 2.51.2 From 05cb4af9793dc618bb1769b9ef9023a7ec8a4dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 10 Jul 2025 22:13:56 +0200 Subject: [PATCH 11/15] build(gradle): When running in the Playground, enable the template library --- build.gradle.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d79610b..7fb5733 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,7 +25,7 @@ plugins { dependencies { // List the 'library' projects - // dokka(projects.core) + // library(projects.core) } // region Check the users of the project didn't forget to rename the group @@ -35,6 +35,15 @@ if (projectPath != null && projectPath != "opensavvy/playgrounds/gradle" && grou error("The project is declared to be in the group '$group', which is recognized as the Gradle Playground, but it's hosted in '$projectPath', which is not the Playground. Maybe you forgot to rename the group when importing the Playground in your own project?") } +// endregion +// region Enable the :lib template if we're in the playground + +if (group == "dev.opensavvy.playground") { + dependencies { + library(projects.gradle.templates.templateLib) + } +} + // endregion // region Always ignore the yarn.lock file // See https://kotlinlang.org/docs/js-project-setup.html#reporting-that-yarn-lock-has-been-updated -- 2.51.2 From 46d4d104ab1631abdf2060dc98da71f962b5b9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 10 Jul 2025 22:38:30 +0200 Subject: [PATCH 12/15] ci(gitlab): Start publishing MavenCentral snapshots --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e6b500..56bf7fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,6 +168,26 @@ publish-maven:gitlab: - if: $CI_COMMIT_TAG - when: manual +publish-maven:central:snapshots: + extends: [ .kotlin-jvm ] + needs: + - os.version + stage: deploy + + script: + - > + ./gradlew :publishAggregationToCentralPortalSnapshots + -PappVersion="${project_version}-SNAPSHOT" + + interruptible: false + rules: + - if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null + when: never + - if: $PUBLISH_MAVEN == "no" || $PUBLISH_MAVEN_CENTRAL == "no" + when: never + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + - when: manual + publish-maven:central:initialize: extends: [ .kotlin-jvm ] needs: -- 2.51.2 From da7e9d890cc1b44d4c6486521968788aa3361947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 12 Jul 2025 13:08:36 +0200 Subject: [PATCH 13/15] ci(gitlab): Publish all MavenCentral artifacts in a single job using the Linux runner --- .gitlab-ci.yml | 73 +------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56bf7fd..bebd0e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -188,88 +188,17 @@ publish-maven:central:snapshots: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - when: manual -publish-maven:central:initialize: - extends: [ .kotlin-jvm ] - needs: - - os.version - stage: deploy - - script: - - > - ./gradlew initializeSonatypeStagingRepository - --no-configuration-cache - -PappVersion=$project_version - - interruptible: false - rules: - - if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null - when: never - - if: $PUBLISH_MAVEN == "no" || $PUBLISH_MAVEN_CENTRAL == "no" - when: never - - if: $CI_COMMIT_TAG - publish-maven:central: extends: [ .kotlin-jvm ] needs: - os.version - - publish-maven:central:initialize stage: deploy script: - export SIGNING_KEY_RING=$(mktemp) - <"$SIGNING_KEY_RING_B64" base64 -d >"$SIGNING_KEY_RING" - > - ./gradlew findSonatypeStagingRepository publishToSonatype - -x initializeSonatypeStagingRepository - --no-configuration-cache - -PappVersion=$project_version - - interruptible: false - rules: - - if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null - when: never - - if: $PUBLISH_MAVEN == "no" || $PUBLISH_MAVEN_CENTRAL == "no" - when: never - - if: $CI_COMMIT_TAG - -publish-maven:central[ios]: - extends: [ .kotlin-native-iosArm64 ] - needs: - - os.version - - publish-maven:central:initialize - - publish-maven:central - stage: deploy - - script: - - export SIGNING_KEY_RING=$(mktemp) - - <"$SIGNING_KEY_RING_B64" base64 -d >"$SIGNING_KEY_RING" - - > - ./gradlew findSonatypeStagingRepository publishToSonatype - -x initializeSonatypeStagingRepository - --no-configuration-cache - -PappVersion=$project_version - - interruptible: false - rules: - - if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null - when: never - - if: $PUBLISH_MAVEN == "no" || $PUBLISH_MAVEN_CENTRAL == "no" || $PUBLISH_MAVEN_IOS == "no" - when: never - - if: $CI_COMMIT_TAG - -publish-maven:central:release: - extends: [ .kotlin-jvm ] - needs: - - job: os.version - - job: publish-maven:central - - job: publish-maven:central[ios] - optional: true - stage: deploy - - script: - - > - ./gradlew findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository - --no-configuration-cache + ./gradlew publishAggregationToCentralPortal -PappVersion=$project_version interruptible: false -- 2.51.2 From 200b832732a3d16ad5be44139eb356a81a58a36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 16 Jul 2025 22:25:35 +0200 Subject: [PATCH 14/15] ci(gitlab): Don't block merging if the artifacts are not manually deployed --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bebd0e3..2e9da0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,6 +167,7 @@ publish-maven:gitlab: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG - when: manual + allow_failure: true # Needed to avoid blocking the pipelines publish-maven:central:snapshots: extends: [ .kotlin-jvm ] @@ -187,6 +188,7 @@ publish-maven:central:snapshots: when: never - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - when: manual + allow_failure: true # Needed to avoid blocking the pipelines publish-maven:central: extends: [ .kotlin-jvm ] -- 2.51.2 From efdd9225fac913e115ad01ea18649cf45003db4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 19 Jul 2025 16:10:27 +0200 Subject: [PATCH 15/15] build(kotlin): Allow more memory to Kotlin, but be more aggressive about cleaning it up --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 83c5565..e556780 100644 --- a/gradle.properties +++ b/gradle.properties @@ -46,4 +46,4 @@ kotlin.js.yarn=false # System resource usage org.gradle.jvmargs=-Xmx3g -Xms200m -XX:MaxMetaspaceSize=512m -XX:+UseCompressedOops -XX:+UseG1GC -XX:NewRatio=3 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:G1PeriodicGCInterval=60000 -XX:-G1PeriodicGCInvokesConcurrent -kotlin.daemon.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:NewRatio=2 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=40 -XX:G1PeriodicGCInterval=30000 -XX:-G1PeriodicGCInvokesConcurrent +kotlin.daemon.jvmargs=-Xmx3g -Xms128m -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:NewRatio=2 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=40 -XX:G1PeriodicGCInterval=15000 -XX:-G1PeriodicGCInvokesConcurrent