-
Notifications
You must be signed in to change notification settings - Fork 478
/
settings.gradle
36 lines (27 loc) · 980 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
rootProject.name = 'ngrinder'
import static groovy.io.FileVisitResult.*
import static groovy.io.FileType.*
def matchingProjectDIR = ~/^ngrinder-.*/
def matchingPluginDIR = ~/^ngrinder-plugin-.*/
def getProjectName(String dir) {
return dir.minus(rootDir.toString() + "/").replaceAll("/", ":")
}
def preDir = {
if (!matchingProjectDIR.matcher(it.name).matches()) {
return SKIP_SUBTREE
}
}
rootDir.traverse(type: DIRECTORIES, preDir: preDir) { dir ->
def dstr = dir.toString()
if (matchingProjectDIR.matcher(dir.name) && new File(dstr + "/build.gradle").exists()) {
include getProjectName(dir.name)
}
}
def plugins = []
rootDir.traverse(type: DIRECTORIES, preDir: preDir) { dir ->
def dstr = dir.toString()
if (matchingPluginDIR.matcher(dir.name) && new File(dstr + "/build.gradle").exists() && !(new File(dstr + "/ignore").exists())) {
plugins.add(":" + getProjectName(dir.name))
}
}
gradle.ext.plugins = plugins