Fixed issue when custom build props are not available
This commit is contained in:
parent
8fe6910fc5
commit
4b6203e78c
16
build.gradle
16
build.gradle
@ -19,12 +19,18 @@ import java.time.Instant
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
// load properties from custom location
|
// load properties from custom location
|
||||||
def propsFile = Paths.get("${projectDir}/../../gradle.properties").toAbsolutePath().normalize().toFile()
|
def propsFile = Paths.get("${projectDir}/../../gradle.properties").normalize().toFile()
|
||||||
println("Loading custom property data from: ${propsFile}")
|
if (propsFile.canRead()) {
|
||||||
|
println("Loading custom property data from: ${propsFile}")
|
||||||
|
|
||||||
def props = new Properties()
|
def props = new Properties()
|
||||||
propsFile.withInputStream {props.load(it)}
|
propsFile.withInputStream {props.load(it)}
|
||||||
props.each {key, val -> project.ext.set(key, val)}
|
props.each {key, val -> project.ext.set(key, val)}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ext.sonatypeUsername = ""
|
||||||
|
ext.sonatypePassword = ""
|
||||||
|
}
|
||||||
|
|
||||||
// for plugin publishing and license sources
|
// for plugin publishing and license sources
|
||||||
repositories {
|
repositories {
|
||||||
|
Loading…
Reference in New Issue
Block a user