/
settings.gradle.kts
34 lines (30 loc) · 1.25 KB
/
settings.gradle.kts
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
rootProject.name = "coronium.root"
pluginManagement {
repositories {
maven("https://artifacts.metaborg.org/content/groups/public/")
}
}
if(org.gradle.util.VersionNumber.parse(gradle.gradleVersion).major < 6) {
enableFeaturePreview("GRADLE_METADATA")
}
// Only include composite builds when this is the root project (it has no parent). Otherwise, the parent project will
// include these composite builds, as IntelliJ does not support nested composite builds.
if(gradle.parent == null) {
// We split the build up into one main composite build in the 'plugin' directory, because it builds Gradle plugins,
// which we want to test. Gradle plugins are not directly available in a multi-project build, therefore a separate
// composite build is required.
includeBuildWithName("plugin", "coronium")
// Included builds listed below can use the Gradle plugins built in 'plugin'.
includeBuildWithName("example", "coronium.example")
}
fun includeBuildWithName(dir: String, name: String) {
includeBuild(dir) {
try {
ConfigurableIncludedBuild::class.java
.getDeclaredMethod("setName", String::class.java)
.invoke(this, name)
} catch(e: NoSuchMethodException) {
// Running Gradle < 6, no need to set the name, ignore.
}
}
}