11import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22
33plugins {
4- id(" java-library" )
4+ id(" java" )
5+ id(" com.gradleup.shadow" ) version " 8.3.6"
56 id(" net.minecrell.plugin-yml.bukkit" ) version " 0.6.0"
67 id(" xyz.jpenilla.run-paper" ) version " 2.3.1"
7- id(" com.github.johnrengelman.shadow" )
88}
99
1010group = " dev.rollczi"
11- version = " 1.3 .0"
11+ version = " 2.0 .0"
1212
1313repositories {
1414 mavenCentral()
15- maven { url = uri(" https://hub.spigotmc.org/nexus/content/repositories/snapshots/" ) }
15+ maven(" https://hub.spigotmc.org/nexus/content/repositories/snapshots/" )
16+ }
1617
18+ tasks.withType<JavaCompile > {
19+ options.encoding = " UTF-8"
1720}
1821
1922dependencies {
20- compileOnly(" org.spigotmc:spigot-api:1.19.1 -R0.1-SNAPSHOT" )
23+ compileOnly(" org.spigotmc:spigot-api:1.21.4 -R0.1-SNAPSHOT" )
2124 implementation(rootProject.project)
2225
2326 testImplementation(" org.junit.jupiter:junit-jupiter-api:5.11.4" )
2427 testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine:5.11.4" )
2528}
2629
2730bukkit {
28- main = " dev.rollcz .skullplugin.SkullPlugin"
31+ main = " dev.rollczi .skullplugin.SkullPlugin"
2932 apiVersion = " 1.13"
3033 author = " Rollczi"
3134 name = " LiteSkullApiTest"
3235 version = " ${project.version} "
3336 commands.create(" give-skull" )
3437}
3538
36- tasks.withType<ShadowJar > {
37- archiveFileName.set(" LiteSkullAPIPlugin v${project.version} (MC 1.8.8-1.19x).jar" )
38-
39- exclude(" org/intellij/lang/annotations/**" ," org/jetbrains/annotations/**" ," org/checkerframework/**" ," META-INF/**" ," javax/**" )
39+ tasks.runServer {
40+ minecraftVersion(" 1.21.5" )
41+ allJvmArgs = listOf (" -DPaper.IgnoreJavaVersion=true" )
42+ javaLauncher = javaToolchains.launcherFor {
43+ languageVersion.set(JavaLanguageVersion .of(21 ))
44+ }
45+ }
4046
41- mergeServiceFiles()
42- minimize( )
47+ tasks.withType< ShadowJar > {
48+ archiveFileName.set( " LiteSkullAPIPlugin v ${project.version} (MC 1.8.8-1.21x).jar " )
4349
4450 val prefix = " dev.rollczi.skullplugin.libs"
4551 listOf (
46- " dev.rollczi.liteskullapi" ,
52+ " dev.rollczi.liteskullapi" ,
4753 ).forEach { pack ->
4854 relocate(pack, " $prefix .$pack " )
4955 }
@@ -52,7 +58,3 @@ tasks.withType<ShadowJar> {
5258tasks.getByName<Test >(" test" ) {
5359 useJUnitPlatform()
5460}
55-
56- tasks.withType<JavaCompile > {
57- options.encoding = " UTF-8"
58- }
0 commit comments