-
-
Notifications
You must be signed in to change notification settings - Fork 75
/
settings.gradle
37 lines (31 loc) · 1 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
rootProject.name = 'mcp_config'
ext.versions = [] as Set
def addDirectory(path) {
path.eachDir() {
def relative = rootDir.toPath().relativize(it.toPath()).toFile()
include relative.path
project(':' + relative.path).name = it.name
versions.add(it.name)
}
}
def type = hasProperty('type') ? getProperty('type').toLowerCase() : 'release'
if ('release'.equals(type)) {
addDirectory(new File(rootDir, 'versions/release/'))
} else if ('snapshot'.equals(type)) {
if (hasProperty('ver')) {
addDirectory(new File(rootDir, 'versions/snapshot/' + getProperty('ver')))
} else {
new File(rootDir, 'versions/snapshot/').eachDir() {
addDirectory(it)
}
}
} else if ('pre'.equals(type)) {
if (hasProperty('ver')) {
addDirectory(new File(rootDir, 'versions/pre/' + getProperty('ver')))
} else {
new File(rootDir, 'versions/pre/').eachDir() {
addDirectory(it)
}
}
}
println('Versions: ' + versions)