-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
45 lines (43 loc) · 1.28 KB
/
settings.gradle.kts
File metadata and controls
45 lines (43 loc) · 1.28 KB
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
import groovy.json.JsonSlurper
pluginManagement {
repositories {
maven {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven {
name = "Jitpack"
url = uri("https://jitpack.io")
}
maven {
url = uri("https://maven.firstdark.dev/releases") // For ModPublisher
}
maven {
url = uri("https://maven.firstdark.dev/snapshots")
}
mavenCentral()
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.replaymod.preprocess" -> {
useModule("com.github.Fallen-Breath:preprocessor:${requested.version}")
}
}
}
}
}
(JsonSlurper().parseText(file("settings.json").readText()) as Map<String, Map<String, Int>>)["versions"]?.forEach { versionEntry ->
val versionName = versionEntry.key
val versionNumber = versionEntry.value
include(":$versionName")
project(":$versionName").apply {
projectDir = file("versions/$versionName")
buildFileName = if (versionNumber >= 260000) {
"../../common.gradle.kts"
} else {
"../../common.remap.gradle.kts"
}
}
}