-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathsettings.gradle
38 lines (35 loc) · 1.05 KB
/
settings.gradle
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
import groovy.json.JsonSlurper
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'Jitpack'
url = "https://jitpack.io"
}
resolutionStrategy {
eachPlugin {
switch (requested.id.id) {
case "com.replaymod.preprocess": {
useModule("com.github.Fallen-Breath:preprocessor:${requested.version}")
break
}
}
}
}
}
}
Map<String, List<String>> settings = file("settings.json").withReader {
new JsonSlurper().parse(it) as Map<String, List<String>>
}
for (String version : settings.get("versions")) {
include(":$version")
ProjectDescriptor proj = project(":$version")
proj.setProjectDir(file("versions/$version"))
proj.setBuildFileName("../${settings.versions.get(0)}/build.gradle")
}