forked from CraftTweaker/CraftTweaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
76 lines (67 loc) · 2.06 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import java.io.FileFilter
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.fabricmc.net/") {
name = "Fabric"
}
maven("https://repo.spongepowered.org/repository/maven-public/") {
name = "Sponge Snapshots"
}
maven("https://maven.minecraftforge.net") {
name = "Forge"
}
maven("https://maven.parchmentmc.org") {
name = "ParchmentMC"
}
maven("https://maven.blamejared.com") {
name = "BlameJared"
}
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "net.minecraftforge.gradle") {
useModule("${requested.id}:ForgeGradle:${requested.version}")
}
if (requested.id.id == "org.spongepowered.mixin") {
useModule("org.spongepowered:mixingradle:${requested.version}")
}
}
}
}
rootProject.name = "CraftTweaker"
val excludedProjects = setOf(
"ModuleDeserializer",
"ModuleSerializationShared",
"ModuleSerializer",
"JavaSource",
"JavaSourceCompiler",
"IDE",
"Constructor",
"DrawableGui",
"DrawableGuiIconConverter",
"CompilerShared"
)
include("ZenCode")
collectSubProjects("ZenCode")
include("Common")
include("Fabric")
include("Forge")
if (file("CraftTweaker-Annotation-Processors").exists()) {
includeBuild("CraftTweaker-Annotation-Processors") {
dependencySubstitution {
substitute(module("com.blamejared.crafttweaker:Crafttweaker_Annotation_Processors")).using(project(":"))
}
}
}
fun collectSubProjects(folder: String) {
file(folder).listFiles(FileFilter {
if (!it.isDirectory || excludedProjects.contains(it.name)) {
return@FileFilter false
}
return@FileFilter File(it, "build.gradle").isFile || File(it, "build.gradle.kts").isFile
})?.forEach {
include(":${it.name}")
project(":${it.name}").projectDir = File("./$folder/" + it.name)
}
}