-
Notifications
You must be signed in to change notification settings - Fork 304
/
settings.gradle
36 lines (28 loc) · 986 Bytes
/
settings.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
35
36
/**
* Load Orgzly-specific properties from app.properties.
* File is not included, see sample.app.properties file.
*/
def loadAppProperties() {
Properties properties = new Properties()
def file = new File(settingsDir, 'app.properties')
if (file.exists()) {
properties.load(file.newDataInputStream())
} else {
logger.warn("Properties file ${file} does not exist")
}
return properties
}
gradle.ext.appProperties = loadAppProperties()
// Setup org-java project if "org_java" is set to an existing directory.
if (gradle.ext.appProperties.org_java_directory?.trim()) {
def path = gradle.ext.appProperties.org_java_directory
def dir = path.startsWith('/') ? new File(path) : new File(settingsDir, path)
if (dir.exists()) {
include ':org-java'
project(':org-java').projectDir = dir
gradle.ext.orgJavaDir = dir
} else {
logger.warn("Ignoring non-existent directory $dir")
}
}
include ':app'