From 6582e45ac0c83278ec8d5d7a568382d8b9c28526 Mon Sep 17 00:00:00 2001 From: Xavier Molloy Date: Wed, 3 Jul 2024 14:32:37 +0200 Subject: [PATCH] ci: fix maven publish --- build.gradle.kts | 11 ++++++++++- designsystem/build.gradle.kts | 11 ++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6bd16985c..174b6987e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - +version = "0.2-SNAPSHOT" group = "org.hisp.dhis.mobile" plugins { @@ -13,6 +13,15 @@ plugins { id("io.github.gradle-nexus.publish-plugin") version "1.3.0" } +/** + * Property from the Gradle command line. To remove the snapshot suffix from the version. + */ +if (project.hasProperty("removeSnapshotSuffix")) { + val mainVersion = (version as String).split("-SNAPSHOT")[0] + version = mainVersion +} + + allprojects { apply(plugin = "org.jlleitschuh.gradle.ktlint") ktlint { diff --git a/designsystem/build.gradle.kts b/designsystem/build.gradle.kts index 43d36ceac..0b28ada97 100644 --- a/designsystem/build.gradle.kts +++ b/designsystem/build.gradle.kts @@ -1,5 +1,5 @@ -version = "0.2-SNAPSHOT" -group = "org.hisp.dhis.mobile" +version = rootProject.version +group = rootProject.group plugins { kotlin("multiplatform") @@ -9,13 +9,6 @@ plugins { id("app.cash.paparazzi").version("1.3.3") } -/** - * Property from the Gradle command line. To remove the snapshot suffix from the version. - */ -if (project.hasProperty("removeSnapshotSuffix")) { - val mainVersion = (version as String).split("-SNAPSHOT")[0] - version = mainVersion -} kotlin { androidTarget {