Only fetch publishing information when relevant envvars are set
This commit is contained in:
parent
a65cfc801b
commit
f043020b45
|
|
@ -44,14 +44,19 @@ tasks.named('test') {
|
|||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
String repository_url = System.getenv("REPOSITORY_URL")
|
||||
String username = System.getenv("USERNAME")
|
||||
String password = System.getenv("TOKEN")
|
||||
if (repository_url && username && password) {
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "OSSRH"
|
||||
url = uri(System.getenv("REPOSITORY_URL"))
|
||||
url = uri(repository_url)
|
||||
credentials {
|
||||
username = System.getenv("USERNAME")
|
||||
password = System.getenv("TOKEN")
|
||||
username = username
|
||||
password = password
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -63,3 +68,5 @@ publishing {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue