forked from tridium/bajaux-progressbar-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
34 lines (29 loc) · 1.15 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def getGradleProperty(String propName) {
if (gradle.hasProperty(propName)) {
gradle.getProperty(propName)
} else {
// Get system property, or, failing that, fall back to environment variable
// This allows setting, e.g., -Dniagara_home=blah
System.getProperty(propName) ?: System.getenv(propName)
}
}
ext.niagara_home = getGradleProperty('NIAGARA_HOME_46')
ext.niagara_dev_home = getGradleProperty('niagara_dev_home')
ext.niagara_user_home = getGradleProperty('niagara_user_home')
println(" Environment Settings:" )
println(" ext.niagara_home: [${rootProject.ext.niagara_home}]")
println(" ext.niagara_dev_home: [${rootProject.ext.niagara_dev_home}]")
println(" ext.niagara_user_home: [${rootProject.ext.niagara_user_home}]")
if (ext.niagara_home == null) {
logger.error('niagara_home environment variable not set')
}
apply from: "${rootProject.ext.niagara_home}/etc/gradle/idea.gradle"
gradle.beforeProject { p ->
configure(p) {
def vendorSettings = file("${rootDir}/vendor.gradle")
if (vendorSettings.exists()) {
apply from: vendorSettings
}
apply from: "${rootProject.ext.niagara_home}/etc/gradle/niagara.gradle"
}
}