11plugins {
22 id(" maven-publish" )
3- id(" xyz.jpenilla.run-paper" ) version " 2. 3.0"
3+ id(" xyz.jpenilla.run-paper" ) version " 3.0.2 "
44 id(" com.modrinth.minotaur" ) version " 2.+"
5- id(" com.github.johnrengelman. shadow" ) version " 8.1.1 "
5+ id(" com.gradleup. shadow" ) version " 9.3.0 "
66}
77
88val supportedVersions = listOf (
99 " 1.19.4" ,
1010 " 1.20" , " 1.20.1" , " 1.20.2" , " 1.20.3" , " 1.20.4" , " 1.20.5" , " 1.20.6" ,
11- " 1.21" , " 1.21.1" , " 1.21.2" , " 1.21.3" , " 1.21.4"
11+ " 1.21" , " 1.21.1" , " 1.21.2" , " 1.21.3" , " 1.21.4" , " 1.21.5" , " 1.21.6" ,
12+ " 1.21.7" , " 1.21.8" , " 1.21.9" , " 1.21.10" , " 26.1.1" , " 26.1.2"
1213)
1314
1415repositories {
@@ -30,11 +31,11 @@ tasks {
3031 runServer {
3132 dependsOn(" bundledJar" )
3233
33- minecraftVersion(" 1.20.6 " )
34+ minecraftVersion(" 1.21.11 " )
3435
35- // Set Java 21 (1.20.6 requires Java 21)
36+ // Set Java 21 (1.21.11 requires Java 21)
3637 javaLauncher = project.javaToolchains.launcherFor {
37- languageVersion = JavaLanguageVersion .of(21 )
38+ languageVersion = JavaLanguageVersion .of(25 )
3839 }
3940 }
4041
@@ -52,13 +53,17 @@ tasks {
5253 archiveFileName.set(" BattleArena.jar" )
5354 }
5455
55- val extractShadowJar by creating(Copy ::class ) {
56+ val extractShadowJar by registering(Copy ::class ) {
57+ description = " Extracts the contents of the shadow jar to a temporary directory for bundling into the final jar."
58+
5659 dependsOn(shadowJar)
5760 from(zipTree(shadowJar.get().archiveFile.get().asFile))
5861 into(layout.buildDirectory.get().asFile.resolve(" extractedShadow" ))
5962 }
6063
61- create<Jar >(" bundledJar" ) {
64+ val bundledJar by registering(Jar ::class ) {
65+ description = " Creates a bundled jar with all dependencies included, excluding the ones that are shaded in the shadow jar."
66+
6267 dependsOn(extractShadowJar)
6368 from(layout.buildDirectory.get().asFile.resolve(" extractedShadow" ))
6469
0 commit comments