-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildExt.gradle
34 lines (27 loc) · 1.16 KB
/
buildExt.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
gradle.ext.getVisionLibPath = {
final def properties = new Properties()
final def localProperties = file('local.properties')
properties.load(localProperties.newDataInputStream())
final def libPath = properties.getProperty("vision.lib.dir", "")
if(libPath.isEmpty())
return ""
final def libDir = file(libPath)
if (!libDir.exists())
throw GradleException("'vision.lib.dir' has path '${libDir.getAbsolutePath()}', but it does not exist")
return "${libDir.getAbsolutePath()}"
}
gradle.ext.getSygicLicense = {
final def properties = new Properties()
final def localProperties = file('local.properties')
properties.load(localProperties.newDataInputStream())
final def sygicLicense = properties.getProperty("sygic.license", "")
if(sygicLicense.isEmpty())
logger.warn("'sygic.license' is empty. You need a license to make app working!")
return sygicLicense
}
gradle.ext.getTestFairyKey = {
final def properties = new Properties()
final def localProperties = file('local.properties')
properties.load(localProperties.newDataInputStream())
return properties.getProperty("test.fairy.key", "")
}