From 790119292f2ccbf19c4f8308489917de3e01fedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sun, 18 May 2025 15:12:40 +0200 Subject: [PATCH 1/3] build(gradle): Update WASM experimental annotation --- gradle/templates/template-lib/build.gradle.kts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle/templates/template-lib/build.gradle.kts b/gradle/templates/template-lib/build.gradle.kts index 067e592..ba25448 100644 --- a/gradle/templates/template-lib/build.gradle.kts +++ b/gradle/templates/template-lib/build.gradle.kts @@ -1,11 +1,12 @@ -import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl +@file:OptIn(ExperimentalWasmDsl::class) + +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { alias(opensavvyConventions.plugins.base) alias(opensavvyConventions.plugins.kotlin.library) } -@OptIn(ExperimentalWasmDsl::class) kotlin { jvm() js { -- 2.51.2 From 374338810e5507e061e17f1cd45bc7d10914d4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sun, 18 May 2025 15:14:24 +0200 Subject: [PATCH 2/3] build(gradle): Create the 'common' version catalog --- build.gradle.kts | 6 ++++- gradle/common.versions.toml | 26 +++++++++++++++++++ gradle/conventions/settings.gradle.kts | 3 +++ .../templates/template-lib/build.gradle.kts | 4 +-- settings.gradle.kts | 6 +++++ 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 gradle/common.versions.toml diff --git a/build.gradle.kts b/build.gradle.kts index 56f3094..d79610b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,11 @@ plugins { // Some plugins *must* be configured on the root project. // In these cases, we explicitly tell Gradle not to apply them. - alias(opensavvyConventions.plugins.aligned.kotlin) apply false + alias(libsCommon.plugins.kotlin) apply false + alias(libsCommon.plugins.kotlin.jvm) apply false + alias(libsCommon.plugins.kotest) apply false + alias(libsCommon.plugins.kotlinx.serialization) apply false + alias(libsCommon.plugins.kotlinx.powerAssert) apply false } dependencies { diff --git a/gradle/common.versions.toml b/gradle/common.versions.toml new file mode 100644 index 0000000..fd097f7 --- /dev/null +++ b/gradle/common.versions.toml @@ -0,0 +1,26 @@ +# List of dependencies, shared between all OpenSavvy projects +# This file should only be modified in the repository https://gitlab.com/opensavvy/playgrounds/gradle +# Other repositories will automatically sync themselves. + +[versions] +kotlin = "2.1.20" # https://kotlinlang.org/docs/releases.html#release-details +compose = "1.8.0" # https://github.com/JetBrains/compose-multiplatform/releases +kotest = "5.9.1" # https://github.com/kotest/kotest/releases +kotest-plugin = "6.0.0.M2" + +[plugins] +kotlin = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kotlinx-powerAssert = { id = "org.jetbrains.kotlin.plugin.power-assert", version.ref = "kotlin" } + +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose" } + +kotest = { id = "io.kotest.multiplatform", version.ref = "kotest-plugin" } + +[libraries] +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } +kotlin-test-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin" } + +[bundles] diff --git a/gradle/conventions/settings.gradle.kts b/gradle/conventions/settings.gradle.kts index 504e1e1..357d781 100644 --- a/gradle/conventions/settings.gradle.kts +++ b/gradle/conventions/settings.gradle.kts @@ -11,6 +11,9 @@ dependencyResolutionManagement { create("libs") { from(files("../libs.versions.toml")) } + create("libsCommon") { + from(files("../common.versions.toml")) + } } } diff --git a/gradle/templates/template-lib/build.gradle.kts b/gradle/templates/template-lib/build.gradle.kts index ba25448..5f36bf8 100644 --- a/gradle/templates/template-lib/build.gradle.kts +++ b/gradle/templates/template-lib/build.gradle.kts @@ -37,11 +37,11 @@ kotlin { } sourceSets.commonTest.dependencies { - implementation(opensavvyConventions.aligned.kotlin.test) + implementation(libsCommon.kotlin.test) } sourceSets.jvmTest.dependencies { - implementation(opensavvyConventions.aligned.kotlin.test.junit5) + implementation(libsCommon.kotlin.test.junit5) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 15475e7..f7f173e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,12 @@ dependencyResolutionManagement { repositories { mavenCentral() } + + versionCatalogs { + create("libsCommon") { + from(files("gradle/common.versions.toml")) + } + } } pluginManagement { -- 2.51.2 From c3e493c77f9df7bf53ae493e37d0b03577a3de6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 29 May 2025 10:18:57 +0200 Subject: [PATCH 3/3] upgrade(gradle): OpenSavvy Conventions 2.0.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 357d781..921dc0d 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 "1.6.3" + id("dev.opensavvy.conventions.settings") version "2.0.1" } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/settings.gradle.kts b/settings.gradle.kts index f7f173e..f4b0fc0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -55,7 +55,7 @@ pluginManagement { } plugins { - id("dev.opensavvy.conventions.settings") version "1.6.3" + id("dev.opensavvy.conventions.settings") version "2.0.1" } include( -- 2.51.2