switch from using gradle.properties to enviroment variables for repository auth
This commit is contained in:
parent
600d3f2fca
commit
6686e98836
2 changed files with 6 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -44,5 +44,3 @@ bin/
|
||||||
|
|
||||||
/plugin/run/
|
/plugin/run/
|
||||||
/.idea/
|
/.idea/
|
||||||
|
|
||||||
gradle.properties
|
|
||||||
|
|
|
@ -22,13 +22,13 @@ publishing {
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
if (properties.containsKey("DIST_USERNAME") && properties.containsKey("DIST_PASSWORD")) {
|
Map<String, String> systemProperties = System.getenv()
|
||||||
credentials {
|
credentials {
|
||||||
username properties.get("DIST_USERNAME")
|
if (systemProperties.containsKey("DIST_USERNAME")) username systemProperties.get("DIST_USERNAME")
|
||||||
password properties.get("DIST_PASSWORD")
|
if (systemProperties.containsKey("DIST_PASSWORD")) password systemProperties.get("DIST_PASSWORD")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
url = uri("https://repo.pyr.lol/releases/")
|
// If the BUILD_ID enviroment variable is present that means its a Jenkins build & that it should go into the snapshots repo
|
||||||
|
url = systemProperties.containsKey("BUILD_ID") ? uri("https://repo.pyr.lol/snapshots/") : uri("https://repo.pyr.lol/releases/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue