Add a server build task

This commit is contained in:
zontreck 2024-03-16 13:30:58 -07:00
parent 9ae9ebbfa0
commit a48a85f943

View file

@ -127,4 +127,27 @@ task jarjar(type: Jar) {
jar.finalizedBy(jarjar)
jar.finalizedBy(copyToLib)
jar.finalizedBy(copyNatives)
jar.finalizedBy(copyNatives)
task buildServer(type: Jar){
manifest {
attributes(
'Main-Class': "com.mojang.minecraft.server.MinecraftServer",
"Multi-Release": 'true'
)
} from {
configurations.provided.collect { it.isDirectory() ? it : zipTree(it)}
}
archiveClassifier = "server"
duplicatesStrategy = "exclude"
from {configurations.provided.collect {it.isDirectory()?it:zipTree(it)}}
exclude 'META-INF/*'
with jarjar
}
jar.finalizedBy(buildServer)