-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathsettings.gradle
36 lines (33 loc) · 1.31 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
def dir = new File(settingsDir.toString())
def projects = new HashSet()
def projectSymbol = File.separator + 'src'
dir.eachDirRecurse { subDir ->
def subDirName = subDir.canonicalPath
def isSubProject = true
if (subDirName.endsWith(projectSymbol)) {
for (String projectDir in projects) {
if (subDirName.startsWith(projectDir)) {
isSubProject = false
break
}
}
if (isSubProject) {
projects << subDirName
def lastIndex = subDirName.lastIndexOf(projectSymbol)
def gradleModulePath = subDirName.substring(dir.canonicalPath.length(), lastIndex).replace(File.separator, ':')
//println "include " + gradleModulePath
include gradleModulePath
}
}
}
dir.eachDir { subDir ->
if (subDir.name == "xian_runtime") {
subDir.eachDir { applicationDir ->
def application = applicationDir.canonicalPath.substring(dir.canonicalPath.length()).replace(File.separator, ":")
if (!application.endsWith(":build") && !application.endsWith(":bin") && !application.endsWith(":target") && !application.endsWith(":out") && !application.endsWith(":libs")) {
println "include " + application
include application
}
}
}
}