-
Notifications
You must be signed in to change notification settings - Fork 5
/
settings.gradle
56 lines (49 loc) · 1.63 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
import groovy.io.FileType
import groovy.io.FileVisitResult
pluginManagement {
apply from: file('environment.gradle')
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == 'com.tridium') {
useModule('com.tridium.tools:niagara-plugins:4.1.5')
}
}
}
repositories {
maven {
url "${gradle.ext.niagara_home}/etc/m2/repository"
}
gradlePluginPortal()
}
}
rootProject.name = "envasWeather"
ext {
niagaraRoots = ["${rootProject.name}-rt"]
excludeDirs = ['.hg', 'build', 'out', 'src', 'srcTest', 'bin']
}
// niagaraRoots configuration
def discoveredProjects = [:] as Map<String, File>
niagaraRoots.collect({ file(it) }).findAll({ it.exists() }).each { File projectRoot ->
projectRoot.traverse(
type: FileType.DIRECTORIES,
preRoot: true,
preDir: { File projectDir ->
def projectName = projectDir.name
if (excludeDirs.contains(projectName)) {
return FileVisitResult.SKIP_SUBTREE
}
File buildScript = new File(projectDir, "${projectName}.gradle")
if (buildScript.exists()) {
discoveredProjects[projectName] = projectDir
include projectName
return FileVisitResult.SKIP_SUBTREE
}
}
)
}
rootProject.children.each { project ->
project.projectDir = discoveredProjects[project.name]
project.buildFileName = "${project.name}.gradle"
assert project.projectDir.isDirectory()
assert project.buildFile.isFile()
}