diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 958482e7f..3438728e4 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -37,7 +37,7 @@ jobs: - name: Publish to maven run: ./.github/workflows/scripts/publish-maven.sh env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} SIGNING_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }} SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }} diff --git a/build.gradle.kts b/build.gradle.kts index 6bd16985c..9db369b56 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,14 @@ 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 { @@ -71,8 +79,8 @@ subprojects { } } -val ossrhUsername: String? = System.getenv("SONATYPE_OSSRH_USERNAME") -val ossrhPassword: String? = System.getenv("SONATYPE_OSSRH_PASSWORD") +val ossrhUsername: String? = System.getenv("OSSRH_USERNAME") +val ossrhPassword: String? = System.getenv("OSSRH_PASSWORD") nexusPublishing { this.repositories { diff --git a/designsystem/build.gradle.kts b/designsystem/build.gradle.kts index 43d36ceac..2ae311c0a 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,14 +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 { publishLibraryVariants("release")