-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
250 lines (229 loc) · 8.44 KB
/
build.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
plugins {
id("fabric-loom")
val kotlinVersion: String by System.getProperties()
kotlin("jvm").version(kotlinVersion)
id("com.modrinth.minotaur") version "2.+"
}
base {
val archivesBaseName: String by project
archivesName.set(archivesBaseName)
}
val log: File = file("changelog.md")
val modVersion: String by project
version = modVersion
val mavenGroup: String by project
group = mavenGroup
println("## Changelog for Amethyst Imbuement $modVersion \n\n" + log.readText())
repositories {
maven {
name = "TerraformersMC"
url = uri("https://maven.terraformersmc.com/")
}
maven {
name = "REI"
url = uri("https://maven.shedaniel.me")
}
maven {
name = "Progwml6 maven"
url = uri("https://dvs1.progwml6.com/files/maven/")
}
maven {
name = "Ladysnake Libs"
url = uri("https://maven.ladysnake.org/releases")
}
maven {
name = "Patchouli Lib"
url = uri("https://maven.blamejared.com")
}
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
content {
includeGroup("maven.modrinth")
}
}
maven {
name = "Jitpack"
url = uri("https://jitpack.io")
}
maven {
name = "Patbox"
url = uri("https://maven.nucleoid.xyz/")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\ac\\build\\libs")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\fc\\build\\libs")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\gc\\build\\libs")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\fzzy_config\\build\\libs")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\structurized-reborn-1.0\\build\\libs")
}
flatDir {
dirs("E:\\Documents\\Mod Libraries\\siht\\build\\libs")
}
mavenCentral()
}
dependencies {
val guavaVersion: String by project
implementation("com.google.guava:guava:$guavaVersion")
val minecraftVersion: String by project
minecraft("com.mojang:minecraft:$minecraftVersion")
val yarnMappings: String by project
mappings("net.fabricmc:yarn:$yarnMappings:v2")
val loaderVersion: String by project
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
val fabricVersion: String by project
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricVersion")
val fabricKotlinVersion: String by project
modImplementation("net.fabricmc:fabric-language-kotlin:$fabricKotlinVersion")
val reiVersion: String by project
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api:$reiVersion")
modCompileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:$reiVersion")
modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-fabric:$reiVersion")
val jeiVersion: String by project
modImplementation("mezz.jei:$jeiVersion"){
exclude ("mezz.jei")
}
val emiVersion: String by project
modCompileOnly ("dev.emi:emi-fabric:${emiVersion}:api")
modLocalRuntime ("dev.emi:emi-fabric:${emiVersion}")
val ccaVersion: String by project
modCompileOnly("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${ccaVersion}")
modCompileOnly("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${ccaVersion}")
val trinketsVersion: String by project
modImplementation("dev.emi:trinkets:$trinketsVersion"){
exclude("net.fabricmc.fabric-api")
}
val patchouliVersion: String by project
modImplementation("vazkii.patchouli:Patchouli:$patchouliVersion"){
exclude("net.fabricmc.fabric-api")
}
val structurizedVersion: String by project
modImplementation(":structurized_reborn-$structurizedVersion"){
exclude("net.fabricmc.fabric-api")
}
include(":structurized_reborn-$structurizedVersion")
val acVersion: String by project
modImplementation(":amethyst_core-$acVersion"){
exclude("net.fabricmc.fabric-api")
}
val fcVersion: String by project
modImplementation(":fzzy_core-$fcVersion"){
exclude("net.fabricmc.fabric-api")
}
val gcVersion: String by project
modImplementation(":gear_core-$gcVersion"){
exclude("net.fabricmc.fabric-api")
}
val fzzyConfigVersion: String by project
modImplementation("maven.modrinth:fzzy-config:$fzzyConfigVersion")
val palVersion: String by project
modImplementation("io.github.ladysnake:PlayerAbilityLib:$palVersion"){
exclude("net.fabricmc.fabric-api")
}
//include("io.github.ladysnake:PlayerAbilityLib:$palVersion")
val cmVersion: String by project
implementation("com.github.Fallen-Breath:conditional-mixin:$cmVersion")
include("com.github.Fallen-Breath:conditional-mixin:$cmVersion")
val cpaVersion: String by project
modImplementation("eu.pb4:common-protection-api:$cpaVersion"){
exclude("net.fabricmc.fabric-api")
}
//include("eu.pb4:common-protection-api:$cpaVersion")
val lithiumVersion: String by project
modImplementation("maven.modrinth:lithium:$lithiumVersion")
val mcdeVersion: String by project
modImplementation("maven.modrinth:mc-dungeons-enchanting:$mcdeVersion"){
exclude("net.fabricmc.fabric-api")
}
val sihtVersion: String by project
modImplementation(":should_i_hit_that-$sihtVersion"){
exclude("net.fabricmc.fabric-api")
}
include(":should_i_hit_that-$sihtVersion")
}
tasks {
val javaVersion = JavaVersion.VERSION_17
withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
options.release.set(javaVersion.toString().toInt())
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions { jvmTarget = javaVersion.toString() }
}
jar {
from("LICENSE") { rename { "${base.archivesName.get()}_${it}" } }
}
jar {
from( "credits.txt") { rename { "${base.archivesName.get()}_${it}" } }
}
processResources {
val loaderVersion: String by project
val fabricKotlinVersion: String by project
val trinketsVersion: String by project
val patchouliVersion: String by project
val fcVersion: String by project
val acVersion: String by project
val fzzyConfigVersion: String by project
inputs.property("version", project.version)
inputs.property("id", base.archivesName.get())
inputs.property("loaderVersion", loaderVersion)
inputs.property("fabricKotlinVersion", fabricKotlinVersion)
inputs.property("trinketsVersion", trinketsVersion)
inputs.property("patchouliVersion", patchouliVersion)
inputs.property("fcVersion", fcVersion)
inputs.property("acVersion", acVersion)
inputs.property("fzzyConfigVersion", fzzyConfigVersion)
filesMatching("fabric.mod.json") {
expand(
mutableMapOf(
"version" to project.version,
"id" to base.archivesName.get(),
"loaderVersion" to loaderVersion,
"fabricKotlinVersion" to fabricKotlinVersion,
"trinketsVersion" to trinketsVersion,
"patchouliVersion" to patchouliVersion,
"fcVersion" to fcVersion,
"acVersion" to acVersion,
"fzzyConfigVersion" to fzzyConfigVersion))
}
}
java {
toolchain { languageVersion.set(JavaLanguageVersion.of(javaVersion.toString())) }
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
//withSourcesJar()
}
}
modrinth {
val mcVersions: String by project
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("amethyst-imbuement")
versionNumber.set(modVersion)
versionName.set("${base.archivesName.get()}-$modVersion")
versionType.set("release")
uploadFile.set(tasks.remapJar.get())
gameVersions.addAll(mcVersions.split(","))
loaders.addAll("fabric","quilt")
detectLoaders.set(false)
changelog.set("## Changelog for Amethyst Imbuement $modVersion \n\n" + log.readText())
dependencies{
required.project("fabric-api")
required.project("fabric-language-kotlin")
//required.project("amethyst-core")
//required.project("fzzy-core")
//optional.project("emi")
//embedded.project("trinkets")
//embedded.project("patchouli")
}
debugMode.set(false)
}