-
Notifications
You must be signed in to change notification settings - Fork 4
/
settings.gradle.kts
49 lines (39 loc) · 1.08 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
import dev.kikugie.stonecutter.StonecutterSettings
pluginManagement {
repositories {
maven("https://maven.fabricmc.net/")
maven("https://maven.architectury.dev")
maven("https://maven.minecraftforge.net/")
maven("https://maven.neoforged.net/releases/")
maven("https://maven.kikugie.dev/releases/")
maven("https://maven.kikugie.dev/snapshots/")
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.kikugie.stonecutter") version "0.5-beta.5"
}
fun getProperty(key: String): String? {
return settings.extra[key] as? String
}
fun getVersions(key: String): Set<String> {
return getProperty(key)!!.split(',').map { it.trim() }.toSet()
}
val versions = mapOf(
"fabric" to getVersions("fabric_versions"),
"neoforge" to getVersions("neoforge_versions")
)
val sharedVersions = versions.map { entry ->
val loader = entry.key
entry.value.map { "$it-$loader" }
}.flatten().toSet()
extensions.configure<StonecutterSettings> {
kotlinController = true
centralScript = "build.gradle.kts"
shared {
versions(sharedVersions)
}
create(rootProject)
}
rootProject.name = "Neruina"