-
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathsettings.gradle
More file actions
29 lines (22 loc) · 735 Bytes
/
settings.gradle
File metadata and controls
29 lines (22 loc) · 735 Bytes
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
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
}
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 root = hasProperty('root') ? getProperty('root').toLowerCase().replace('\\', '/') : 'release'
if ('release'.equals(root) || root.indexOf('/') != -1) {
addDirectory(new File(rootDir, 'versions/' + root))
} else {
new File(rootDir, 'versions/' + root + '/').eachDir() {
addDirectory(it)
}
}
println('Versions: ' + versions)