-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
135 lines (117 loc) · 3.77 KB
/
settings.gradle.kts
File metadata and controls
135 lines (117 loc) · 3.77 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@file:Suppress("PropertyName")
import groovy.lang.MissingPropertyException
pluginManagement {
repositories {
// Releases
maven("https://maven.deftu.dev/releases")
maven("https://maven.fabricmc.net")
maven("https://maven.architectury.dev/")
maven("https://maven.minecraftforge.net")
maven("https://repo.essential.gg/repository/maven-public")
maven("https://server.bbkr.space/artifactory/libs-release/")
maven("https://jitpack.io/")
// Snapshots
maven("https://maven.deftu.dev/snapshots")
mavenLocal()
// Default
gradlePluginPortal()
mavenCentral()
}
plugins {
kotlin("jvm") version("2.3.0")
id("dev.deftu.gradle.multiversion-root") version("2.73.0") // Update in libs.versions.toml too!!!
}
}
dependencyResolutionManagement {
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.polyfrost.org/releases")
maven("https://repo.hypixel.net/repository/Hypixel")
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version ("1.0.0")
}
val projectName: String = extra["project.name"]?.toString()
?: throw MissingPropertyException("mod.name has not been set.")
rootProject.name = projectName
if (rootDir.name != projectName) {
logger.error("""
Root directory name (${rootDir.absolutePath}) does not match project name ($projectName)!
This may cause issues with indexing and other tools (see https://youtrack.jetbrains.com/issue/IDEA-317606#focus=Comments-27-7257761.0-0 and https://stackoverflow.com/questions/77878944 ).
If you are experiencing issues, please rename the root directory to match the project name, re-import the project, and invalidate caches if you are on IntelliJ.
""".trimIndent())
}
include(":modules")
project(":modules").apply {
buildFileName = "root.gradle.kts"
}
listOf(
"config",
"config-impl",
"commands",
"hud",
"events",
"ui",
"internal",
"dependencies",
"dependencies:legacy",
"utils",
"relocator",
"poly-compose",
"compose-bundle",
).forEach { module ->
include(":modules:$module")
}
// FOR ALL NEW VERSIONS MAKE SURE TO INCLUDE THEM IN root.gradle.kts !
include(":minecraft")
project(":minecraft").buildFileName = "root.gradle.kts"
include(":bootstrap")
project(":bootstrap").buildFileName = "root.gradle.kts"
listOf(
"1.21.1-neoforge",
"1.21.1-fabric",
"1.21.4-neoforge",
"1.21.4-fabric",
"1.21.5-neoforge",
"1.21.5-fabric",
"1.21.8-neoforge",
"1.21.8-fabric",
"1.21.10-neoforge",
"1.21.10-fabric",
"1.21.11-neoforge",
"1.21.11-fabric",
"26.1-fabric"
).forEach { version ->
val proj = ":minecraft:$version"
include(proj)
project(proj).apply {
projectDir = file("minecraft/versions/$version").also {
if (!it.exists() && !it.mkdirs()) {
throw IllegalStateException("Could not create project directory: ${it.absolutePath}")
}
}
buildFileName = "../../build.gradle.kts"
}
val bootstrapProj = ":bootstrap:bootstrap-$version"
if (listOf(
"1.21.1-fabric",
"1.21.4-fabric",
"1.21.5-fabric",
"1.21.8-fabric",
"1.21.10-fabric",
"1.21.11-fabric",
// "26.1-fabric"
).contains(version)) {
include(bootstrapProj)
project(bootstrapProj).apply {
projectDir = file("bootstrap/versions/$version").also {
if (!it.exists() && !it.mkdirs()) {
throw IllegalStateException("Could not create project directory: ${it.absolutePath}")
}
}
buildFileName = "../../build.gradle.kts"
}
}
}