-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsettings.gradle
60 lines (56 loc) · 2.04 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
rootProject.name = 'osh-android'
def oshMainDir = "$rootDir/.."
// include builds from other repos
def repos = [
'osh-core': [
'lib-ogc/swe-common-core',
'lib-ogc/swe-common-om',
'lib-ogc/sensorml-core',
'lib-ogc/ogc-services-common',
'lib-ogc/ogc-services-swe',
'lib-ogc/ogc-services-sos',
'lib-ogc/ogc-services-sps',
'lib-ogc/sensorml-core',
'lib-ogc/sensorml-core',
'sensorhub-core',
'sensorhub-service-swe',
'sensorhub-storage-perst'
],
'osh-addons': [
'persistence/sensorhub-storage-h2',
'comm/sensorhub-comm-ble',
'comm/sensorhub-comm-ble-dbus',
'sensors/health/sensorhub-driver-angelsensor',
'sensors/video/sensorhub-driver-videocam',
'sensors/video/sensorhub-service-video',
'sensors/positioning/sensorhub-driver-trupulse',
'processing/sensorhub-process-vecmath',
'processing/sensorhub-process-geoloc'
]
]
repos.each { repoName, modules ->
File repoDir = new File(oshMainDir, repoName).getCanonicalFile()
if (!repoDir.exists())
throw new GradleException('Repository ' + repoName + ' is missing. Please clone it from https://github.com/opensensorhub/' + repoName)
modules.each { moduleName ->
File moduleDir = new File(repoDir, moduleName).getCanonicalFile()
// include all folders with build.gradle as subprojects
FileTree subprojects = fileTree(moduleDir).include('**/build.gradle')
subprojects.files.each { File f ->
File projectFolder = f.parentFile
String projectName = projectFolder.name
include projectName
project(':' + projectName).projectDir = projectFolder
}
}
}
// include all folders with build.gradle as subprojects
FileTree subprojects = fileTree(rootDir).include('**/build.gradle')
subprojects.files.each { File f ->
File projectFolder = f.parentFile
if (projectFolder != rootDir) {
String projectName = projectFolder.name
include projectName
project(':' + projectName).projectDir = projectFolder
}
}