Fix username look up
@@ -150,8 +150,8 @@ with(publishing) {
uri("https://oss.sonatype.org/content/repositories/snapshots/") else
uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
- username = project.findProperty("sonatypeUser") as? String
- password = project.findProperty("sonatypePassword") as? String
+ username = project.findProperty("sonatypeUser")?.toString() ?: System.getenv("SONATYPE_USER")
+ password = project.findProperty("sonatypePassword")?.toString() ?: System.getenv("SONATYPE_PASSWORD")
}
}
maven {
