1
+ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2
+
3
+ group = rootProject.group
4
+ version = rootProject.version
5
+
6
+ plugins {
7
+ java
8
+ id(" com.gradleup.shadow" )
9
+ id(" fabric-loom" ) version " 1.7-SNAPSHOT" apply (true )
10
+ }
11
+
12
+ var minecraftVersion = properties[" minecraft_version" ] as String
13
+ var yarnMappings = properties[" yarn_mappings" ] as String
14
+ var loaderVersion = properties[" loader_version" ] as String
15
+ var fabricVersion = properties[" fabric_version" ] as String
16
+
17
+ java {
18
+ toolchain.languageVersion.set(JavaLanguageVersion .of(21 ))
19
+ sourceCompatibility = JavaVersion .VERSION_21
20
+ targetCompatibility = JavaVersion .VERSION_21
21
+ }
22
+
23
+ dependencies {
24
+ shadow(project(" :sdk" ))
25
+
26
+ shadow(" com.github.cryptomorin:XSeries:9.3.1" ) {
27
+ isTransitive = false
28
+ }
29
+
30
+ minecraft(" com.mojang:minecraft:${minecraftVersion} " )
31
+ mappings(" net.fabricmc:yarn:${yarnMappings} :v2" )
32
+
33
+ modImplementation(" net.fabricmc:fabric-loader:${loaderVersion} " )
34
+ modImplementation(" net.fabricmc.fabric-api:fabric-api:${fabricVersion} " )
35
+
36
+ compileOnly(" dev.dejvokep:boosted-yaml:1.3" )
37
+
38
+ modImplementation(" me.lucko:fabric-permissions-api:0.3.1" )
39
+ include(" me.lucko:fabric-permissions-api:0.3.1" )
40
+ }
41
+
42
+
43
+ tasks.named(" shadowJar" , ShadowJar ::class .java) {
44
+ configurations = listOf (project.configurations.shadow.get())
45
+
46
+ relocate(" okhttp3" , " io.tebex.plugin.libs.okhttp3" )
47
+ relocate(" okio" , " io.tebex.plugin.libs.okio" )
48
+ relocate(" dev.dejvokep.boostedyaml" , " io.tebex.plugin.libs.boostedyaml" )
49
+ relocate(" org.jetbrains.annotations" , " io.tebex.plugin.libs.jetbrains" )
50
+ relocate(" kotlin" , " io.tebex.plugin.libs.kotlin" )
51
+ relocate(" com.google.gson" , " io.tebex.plugin.libs.gson" )
52
+ minimize()
53
+
54
+ archiveFileName.set(" ${project.name} -${project.version} -shadow.jar" )
55
+
56
+ finalizedBy(" remapJar" )
57
+ }
58
+
59
+ tasks.remapJar {
60
+ dependsOn(" shadowJar" )
61
+ val shadowJar = tasks.shadowJar.get()
62
+
63
+ inputFile.set(shadowJar.archiveFile)
64
+ archiveFileName.set(" tebex-${project.name} -${project.version} .jar" )
65
+ archiveClassifier.set(shadowJar.archiveClassifier)
66
+ delete(shadowJar.archiveFile)
67
+ }
0 commit comments