Skip to content

Commit

Permalink
MP- 178 credentials made optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sabintrademe committed Mar 21, 2022
1 parent c481337 commit 54450c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions publish-root.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ext["signing.key"] = ''
ext["ossrhUsername"] = ''
ext["ossrhPassword"] = ''
ext["sonatypeStagingProfileId"] = ''
ext["snapshot"] = 'true'

File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
Expand Down
17 changes: 11 additions & 6 deletions publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,17 @@ afterEvaluate {
}
}
signing {
useInMemoryPgpKeys(
rootProject.ext["signing.keyId"],
rootProject.ext["signing.key"],
rootProject.ext["signing.password"],
)
sign publishing.publications
if (rootProject.ext["signing.keyId"] && rootProject.ext["signing.key"] && rootProject.ext["signing.password"]) {
useInMemoryPgpKeys(
rootProject.ext["signing.keyId"],
rootProject.ext["signing.key"],
rootProject.ext["signing.password"],
)
sign publishing.publications

} else {
sign configurations.archives
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down

0 comments on commit 54450c1

Please sign in to comment.