diff --git a/gradle/conventions/settings.gradle.kts b/gradle/conventions/settings.gradle.kts index 64d4817..528b416 100644 --- a/gradle/conventions/settings.gradle.kts +++ b/gradle/conventions/settings.gradle.kts @@ -18,7 +18,7 @@ pluginManagement { } plugins { - id("dev.opensavvy.conventions.settings") version "0.3.0" + id("dev.opensavvy.conventions.settings") version "0.3.2" } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/settings.gradle.kts b/settings.gradle.kts index a7955ae..473e24b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,7 +22,7 @@ pluginManagement { } plugins { - id("dev.opensavvy.conventions.settings") version "0.3.0" + id("dev.opensavvy.conventions.settings") version "0.3.2" } include( -- 2.51.2 From 8ec295b1ed10e8090820d9db375bce1701607959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 16 Dec 2023 18:17:45 +0100 Subject: [PATCH 2/4] ci(gitlab): Simplify the build by removing the Kotlin Platform selection Since we created templates modules, all platforms are always enabled, so all tasks always exist. --- .gitlab-ci.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5fb36a..b23abd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,13 +21,6 @@ workflow: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG -variables: - kotlin_jvm: "yes" - kotlin_js_browser: "yes" - kotlin_js_node: "yes" - kotlin_native_linuxX64: "yes" - kotlin_native_iosArm64: "yes" - # region Kotlin Multiplatform .kotlin-jvm: @@ -35,39 +28,19 @@ variables: image: registry.gitlab.com/opensavvy/automation/containers/java:latest needs: [ os.version ] - rules: - - if: $kotlin_jvm == "yes" - when: always - - when: never - .kotlin-js-browser: extends: [ .os.gradle ] image: registry.gitlab.com/opensavvy/automation/containers/chromium:latest needs: [ os.version ] - rules: - - if: $kotlin_js_browser == "yes" - when: always - - when: never - .kotlin-js-node: extends: [ .os.gradle ] image: registry.gitlab.com/opensavvy/automation/containers/chromium:latest needs: [ os.version ] - rules: - - if: $kotlin_js_node == "yes" - when: always - - when: never - .kotlin-native-linuxX64: extends: [ .kotlin-jvm ] # it already runs on Linux - rules: - - if: $kotlin_native_linuxX64 == "yes" - when: always - - when: never - .kotlin-native-iosArm64: extends: [ .os.gradle ] image: macos-13-xcode-14 @@ -78,11 +51,6 @@ variables: tags: - saas-macos-medium-m1 - rules: - - if: $kotlin_native_iosArm64 == "yes" - when: always - - when: never - # endregion # region Check -- 2.51.2 From 1dcc7492d6347c5a9709f3abfe4c16b41787913d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 16 Dec 2023 18:18:50 +0100 Subject: [PATCH 3/4] ci(gitlab): Use the CI containers images to publish artifacts --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b23abd3..acc7926 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -118,7 +118,7 @@ check[iosArm64]: # region Publishing publish-maven:gitlab: - extends: [ .os.gradle ] + extends: [ .kotlin-jvm ] needs: [ os.version ] stage: deploy @@ -136,7 +136,7 @@ publish-maven:gitlab: - if: $CI_COMMIT_TAG publish-maven:central:initialize: - extends: [ .os.gradle ] + extends: [ .kotlin-jvm ] needs: [ os.version ] stage: deploy @@ -155,7 +155,7 @@ publish-maven:central:initialize: - if: $CI_COMMIT_TAG publish-maven:central: - extends: [ .os.gradle ] + extends: [ .kotlin-jvm ] needs: [ os.version, publish-maven:central:initialize ] stage: deploy @@ -177,7 +177,7 @@ publish-maven:central: - if: $CI_COMMIT_TAG publish-maven:central:release: - extends: [ .os.gradle ] + extends: [ .kotlin-jvm ] needs: [ os.version, publish-maven:central ] stage: deploy -- 2.51.2 From 1faeb275633cedc9cc8d25924c6c85c904b7f1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Sat, 16 Dec 2023 18:25:06 +0100 Subject: [PATCH 4/4] ci(gitlab): Publish iOS artifacts to MavenCentral --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index acc7926..72b3514 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,6 +135,26 @@ publish-maven:gitlab: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_TAG +publish-maven:gitlab[ios]: + extends: [ .kotlin-native-iosArm64 ] + stage: deploy + + script: + - > + ./gradlew + publishIosArm64PublicationToGitLabRepository + publishIosSimulatorArm64PublicationToGitLabRepository + publishIosX64PublicationToGitLabRepository + --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 + publish-maven:central:initialize: extends: [ .kotlin-jvm ] needs: [ os.version ] @@ -176,6 +196,28 @@ publish-maven:central: when: never - if: $CI_COMMIT_TAG +publish-maven:central[ios]: + extends: [ .kotlin-native-iosArm64 ] + 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" || $PUBLISH_MAVEN_IOS == "no" + when: never + - if: $CI_COMMIT_TAG + publish-maven:central:release: extends: [ .kotlin-jvm ] needs: [ os.version, publish-maven:central ]