Skip to content

Commit 5ac08b3

Browse files
committed
Update build.gradle.kts
1 parent cd6105f commit 5ac08b3

1 file changed

Lines changed: 44 additions & 42 deletions

File tree

server/forge_1_20_1/build.gradle.kts

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ dependencies {
2020
mappings(loom.officialMojangMappings())
2121
forge("net.minecraftforge:forge:1.20.1-47.4.20")
2222

23-
shadowImplementation("net.kyori:adventure-text-minimessage:4.26.1")
24-
shadowImplementation("net.kyori:adventure-api:4.26.1")
25-
shadowImplementation("net.kyori:adventure-text-serializer-gson:4.8.1")
26-
shadowImplementation("net.kyori:adventure-text-serializer-legacy:4.8.1")
27-
shadowImplementation("net.kyori:adventure-text-serializer-plain:4.8.1")
28-
shadowImplementation("net.kyori:adventure-key:4.8.1")
23+
modImplementation(include("net.kyori:adventure-text-minimessage:4.26.1")!!)
24+
modImplementation(include("net.kyori:adventure-api:4.26.1")!!)
25+
modImplementation(include("net.kyori:adventure-text-serializer-gson:4.14.0")!!)
26+
modImplementation(include("net.kyori:adventure-text-serializer-legacy:4.14.0")!!)
27+
modImplementation(include("net.kyori:adventure-text-serializer-plain:4.14.0")!!)
28+
modImplementation(include("net.kyori:adventure-key:4.14.0")!!)
29+
modImplementation(include("net.kyori:examination-string:1.3.0")!!)
30+
modImplementation(include("net.kyori:examination-api:1.3.0")!!)
2931
}
3032

3133
tasks {
@@ -40,15 +42,15 @@ tasks {
4042
}
4143

4244
shadowJar {
43-
relocate("net.kyori", "com.coloryr.allmusic.libs.net.kyori")
44-
relocate("com.google.gson", "com.coloryr.allmusic.libs.com.google.gson")
45-
46-
doFirst {
47-
val emptyRoot = project.layout.buildDirectory.dir("tmp/emptyDirs").get().asFile
48-
emptyRoot.mkdirs()
49-
val versionsDir = file("$emptyRoot/META-INF/versions")
50-
versionsDir.mkdirs()
51-
}
45+
// relocate("net.kyori", "com.coloryr.allmusic.libs.net.kyori")
46+
// relocate("com.google.gson", "com.coloryr.allmusic.libs.com.google.gson")
47+
48+
// doFirst {
49+
// val emptyRoot = project.layout.buildDirectory.dir("tmp/emptyDirs").get().asFile
50+
// emptyRoot.mkdirs()
51+
// val versionsDir = file("$emptyRoot/META-INF/versions")
52+
// versionsDir.mkdirs()
53+
// }
5254
}
5355

5456
remapJar {
@@ -57,33 +59,33 @@ tasks {
5759
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
5860
}
5961

60-
remapJar {
61-
inputFile.set(shadowJar.get().archiveFile)
62-
archiveFileName.set("[forge-1.20.1]AllMusic_Server-${project.version}.jar")
63-
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
64-
65-
doLast {
66-
val jarFile = destinationDirectory.get().file(archiveFileName.get()).asFile
67-
val tempDir = layout.buildDirectory.dir("tempInject").get().asFile
68-
tempDir.mkdirs()
69-
70-
project.copy {
71-
from(zipTree(jarFile))
72-
into(tempDir)
73-
}
74-
75-
val versionsDir = file("$tempDir/META-INF/versions")
76-
versionsDir.mkdirs()
77-
78-
project.ant.withGroovyBuilder {
79-
"zip"("destfile" to jarFile.absolutePath) {
80-
"fileset"("dir" to tempDir.absolutePath)
81-
}
82-
}
83-
84-
tempDir.deleteRecursively()
85-
}
86-
}
62+
// remapJar {
63+
// inputFile.set(shadowJar.get().archiveFile)
64+
// archiveFileName.set("[forge-1.20.1]AllMusic_Server-${project.version}.jar")
65+
// destinationDirectory.set(file("${parent!!.projectDir}/../build"))
66+
//
67+
// doLast {
68+
// val jarFile = destinationDirectory.get().file(archiveFileName.get()).asFile
69+
// val tempDir = layout.buildDirectory.dir("tempInject").get().asFile
70+
// tempDir.mkdirs()
71+
//
72+
// project.copy {
73+
// from(zipTree(jarFile))
74+
// into(tempDir)
75+
// }
76+
//
77+
// val versionsDir = file("$tempDir/META-INF/versions")
78+
// versionsDir.mkdirs()
79+
//
80+
// project.ant.withGroovyBuilder {
81+
// "zip"("destfile" to jarFile.absolutePath) {
82+
// "fileset"("dir" to tempDir.absolutePath)
83+
// }
84+
// }
85+
//
86+
// tempDir.deleteRecursively()
87+
// }
88+
// }
8789

8890
build {
8991
dependsOn(remapJar)

0 commit comments

Comments
 (0)