Skip to content

Commit

Permalink
fix maven (#242)
Browse files Browse the repository at this point in the history
* move group

* add sign fix

* add group to designsystem

* add closeAndReleaseSonatypeStagingRepository
  • Loading branch information
andresmr authored May 8, 2024
1 parent 661735f commit 619f443
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scripts/publish-maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -x
branch=$(git rev-parse --abbrev-ref HEAD)

if [ "$branch" = "main" ]; then
./gradlew publishToSonatype -PremoveSnapshotSuffix
./gradlew :designsystem:publishToSonatype closeAndReleaseSonatypeStagingRepository -PremoveSnapshotSuffix
else
./gradlew publishToSonatype
./gradlew :designsystem:publishToSonatype
fi
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "org.hisp.dhis.mobile"

plugins {
kotlin("multiplatform") apply false
id("com.android.application") apply false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ signing {
setRequired({ !version.toString().endsWith("-SNAPSHOT") })
useInMemoryPgpKeys(signingPrivateKey, signingPassword)
sign(publishing.publications)
}
}

// Fix Gradle warning about signing tasks using publishing task outputs without explicit dependencies
// https://github.com/gradle/gradle/issues/26091
tasks.withType<AbstractPublishToMaven>().configureEach {
val signingTasks = tasks.withType<Sign>()
mustRunAfter(signingTasks)
}
2 changes: 1 addition & 1 deletion designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = "org.hisp.dhis.mobile"
version = "0.2-SNAPSHOT"
group = "org.hisp.dhis.mobile"

plugins {
kotlin("multiplatform")
Expand Down

0 comments on commit 619f443

Please sign in to comment.