forked from mozilla-mobile/reference-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
31 lines (24 loc) · 1.17 KB
/
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
include ':app'
Properties localProperties = null;
String settingAppServicesPath = "substitutions.application-services.dir";
// FIXME: substitution configuration for android-components.
// See https://github.com/mozilla-mobile/reference-browser/issues/365
if (file('local.properties').canRead()) {
localProperties = new Properties()
localProperties.load(file('local.properties').newDataInputStream())
logger.lifecycle('Local configuration: loaded local.properties')
} else {
logger.lifecycle('Local configuration: absent local.properties; proceeding as normal.')
}
if (localProperties != null) {
localProperties.each { prop ->
gradle.ext.set("localProperties.${prop.key}", prop.value)
}
String appServicesLocalPath = localProperties.getProperty(settingAppServicesPath);
if (appServicesLocalPath != null) {
logger.lifecycle("Local configuration: substituting application-services modules from path: $appServicesLocalPath")
includeBuild(appServicesLocalPath)
} else {
logger.lifecycle("Local configuration: application-services substitution path missing. You may specify it via '$settingAppServicesPath' setting.")
}
}