Fixed issue when custom properties is not available
parent
35d2a12670
commit
26058de91c
12
build.gradle
12
build.gradle
|
@ -19,12 +19,14 @@ import java.time.Instant
|
|||
|
||||
buildscript {
|
||||
// load properties from custom location
|
||||
def propsFile = Paths.get("${projectDir}/../../gradle.properties").toAbsolutePath().normalize().toFile()
|
||||
println("Loading custom property data from: ${propsFile}")
|
||||
def propsFile = Paths.get("${projectDir}/../../gradle.properties").normalize()
|
||||
if (propsFile.toFile().canRead()) {
|
||||
println("Loading custom property data from: ${propsFile}")
|
||||
|
||||
def props = new Properties()
|
||||
propsFile.withInputStream {props.load(it)}
|
||||
props.each {key, val -> project.ext.set(key, val)}
|
||||
def props = new Properties()
|
||||
propsFile.withInputStream {props.load(it)}
|
||||
props.each {key, val -> project.ext.set(key, val)}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
|
|
Loading…
Reference in New Issue