This repository has been archived by the owner on Feb 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
settings.gradle
62 lines (52 loc) · 2.41 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
gradle.ext.gradleConfigVersion = 137
if (!gradle.ext.has('workspacePath')) {
def env = System.getProperties();
logger.warn("sensorsframework/settings.gradle System.getProperties().stringPropertyNames(): " + env
.stringPropertyNames());
def path = System.getProperty('com.android.studio.gradle.project.path');
if (path != null) {
logger.warn("sensorsframework/settings.gradle Found value for System.getProperty('com.android" +
".studio.gradle.project.path')");
gradle.ext.workspacePath = (new File(path)).getParentFile().getAbsolutePath();
} else {
logger.warn("sensorsframework/settings.gradle No value found for System.getProperty('com.android.studio.gradle.project.path')");
gradle.ext.workspacePath = new File("..").getAbsolutePath();
}
}
logger.warn('sensorsframework/settings.gradle -- gradle.ext.workspacePath: ' + gradle.ext.workspacePath)
gradle.ext.local = gradle.ext.workspacePath + '/gradle-config/remote.gradle'
gradle.ext.remote = 'https://raw.githubusercontent.com/opendatakit/gradle-config/' + gradle.ext.gradleConfigVersion + '/remote.gradle'
gradle.ext.useLocal = true // set to false to always build against remote artifacts
if ((new File(gradle.ext.local)).exists()) {
gradle.ext.useLocalPaths = true
apply from: gradle.ext.local
} else {
gradle.ext.useLocalPaths = false
apply from: gradle.ext.remote
}
settingsScripts.each {
apply from: it
}
include(sensorsFrameworkProjectChild)
if (libraryProjectPath.exists() && gradle.ext.useLocal) {
// check if local library project is present
if (!ext.librarySubProjectDictory.exists()) {
ext.librarySubProjectDictory.mkdirs()
}
include libraryProjectName
project(libraryProjectName).setProjectDir(libraryProjectPath) // set local location
}
if (commonProjectPath.exists() && gradle.ext.useLocal) { // check if local common project is present
if (!ext.commonSubProjectDictory.exists()) {
ext.commonSubProjectDictory.mkdirs()
}
include commonProjectName
project(commonProjectName).setProjectDir(commonProjectPath) // set local location
}
if (sensorsInterfaceProjectPath.exists() && gradle.ext.useLocal) {
if (!ext.sensorsInterfaceSubProjectDictory.exists()) {
ext.sensorsInterfaceSubProjectDictory.mkdirs()
}
include sensorsInterfaceProjectName
project(sensorsInterfaceProjectName).setProjectDir(sensorsInterfaceProjectPath)
}