Skip to content

Commit

Permalink
fix(publish): change pw retrieval method
Browse files Browse the repository at this point in the history
  • Loading branch information
Amar97 committed Oct 21, 2024
1 parent e607b39 commit dd9e540
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ publishing {
if (version.toString().endsWith("SNAPSHOT")) {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "nexus"
credentials(PasswordCredentials::class)
credentials {
username = findProperty("nexusUsername")?.toString() ?: System.getenv("NEXUS_USERNAME")
password = findProperty("nexusPassword")?.toString() ?: System.getenv("NEXUS_PASSWORD")
}
}
} else {
maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
name = "nexus"
credentials(PasswordCredentials::class)
credentials {
username = findProperty("nexusUsername")?.toString() ?: System.getenv("NEXUS_USERNAME")
password = findProperty("nexusPassword")?.toString() ?: System.getenv("NEXUS_PASSWORD")
}
}
}
}
Expand Down

0 comments on commit dd9e540

Please sign in to comment.