-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
52 lines (47 loc) · 1.51 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Set the name of the root project
rootProject.name = extra["base.id"] as String
// Set plugin versions
pluginManagement {
plugins {
id("org.cadixdev.licenser") version (extra["licenser.version"] as String)
id("org.spongepowered.gradle.vanilla") version (extra["vanilla.gradle.version"] as String)
id("fabric-loom") version (extra["loom.version"] as String)
}
resolutionStrategy.eachPlugin {
if (requested.id.toString() == "net.minecraftforge.gradle")
useModule(mapOf(
"group" to requested.id.toString(),
"name" to "ForgeGradle",
"version" to (extra["forge.gradle.version"] as String)
))
}
repositories {
gradlePluginPortal()
maven {
name = "Sponge"
url = uri("https://repo.spongepowered.org/repository/maven-public/")
}
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "Forge"
url = uri("https://maven.minecraftforge.net/")
}
}
}
internal val projectNames: Map<String, List<String>> = mapOf(
(extra["minecraft.id"] as String) to listOf(
extra["minecraft.core.id"] as String,
extra["minecraft.fabric.id"] as String,
extra["minecraft.forge.id"] as String
)
)
// Add Project Builds
include(extra["core.id"] as String)
projectNames.forEach { (key, values) ->
values.forEach {
include("${key}:${key}-${it}")
}
}