11plugins {
2- id ' java'
3- id ' xyz.jpenilla.run-paper' version ' 2.3.1'
2+ id ' java-library'
43 id ' io.github.goooler.shadow' version ' 8.1.8'
4+ id ' xyz.jpenilla.run-paper' version ' 3.0.1'
55}
66
77group = ' lol.hub'
8- version = ' 4.0.4 '
8+ version = pluginVersion
99description = ' Minecraft self-service teleport requests'
1010
11+ ext {
12+ minecraftVersion = project. findProperty(' minecraftVersion' ) ?: ' 1.20.4'
13+ javaVersion = JavaVersion . toVersion(project. findProperty(' javaVersion' ) ?: ' 21' )
14+ pluginVersion = project. findProperty(' pluginVersion' ) ?: ' 1.0.0'
15+ }
16+
1117repositories {
1218 mavenCentral()
1319 maven {
@@ -22,7 +28,7 @@ repositories {
2228 }
2329 maven {
2430 // FoliaLib
25- url = ' https://nexuslite.gcnt.net/repos/other /'
31+ url = ' https://repo.tcoded.com/releases /'
2632 content {
2733 includeGroup ' com.tcoded'
2834 }
@@ -32,26 +38,27 @@ repositories {
3238dependencies {
3339 // paper api
3440 // https://jd.papermc.io/paper/1.20/
35- compileOnly group : ' io.papermc.paper' , name : ' paper-api' , version : " ${ project.minecraft_version } -R0.1-SNAPSHOT"
41+ compileOnly group : ' io.papermc.paper' , name : ' paper-api' , version : " ${ minecraftVersion } -R0.1-SNAPSHOT"
3642
3743 // folia api
3844 // https://jd.papermc.io/folia/1.20/
39- // compileOnly group: 'dev.folia', name: 'folia-api', version: "${project.minecraft_version }-R0.1-SNAPSHOT"
45+ // compileOnly group: 'dev.folia', name: 'folia-api', version: "${minecraftVersion }-R0.1-SNAPSHOT"
4046
4147 // https://github.com/TechnicallyCoded/FoliaLib
42- shadow group : ' com.tcoded' , name : ' FoliaLib' , version : " 0.4.2 "
48+ shadow group : ' com.tcoded' , name : ' FoliaLib' , version : " 0.5.1 "
4349
4450 // Other dependencies
4551 shadow ' org.bstats:bstats-bukkit:3.1.0'
4652}
4753
4854java {
49- toolchain. languageVersion = JavaLanguageVersion . of(21 )
55+ sourceCompatibility = javaVersion
56+ targetCompatibility = javaVersion
5057}
58+
5159tasks. withType(JavaCompile ). configureEach {
52- it. sourceCompatibility = it. targetCompatibility = JavaVersion . toVersion(21 )
53- it. options. release = 21
54- it. options. encoding = ' UTF-8'
60+ options. encoding = ' UTF-8'
61+ options. release = sourceCompatibility. toInteger()
5562}
5663
5764processResources {
@@ -65,29 +72,30 @@ processResources {
6572// https://imperceptiblethoughts.com/shadow/
6673shadowJar {
6774 configurations = [project. configurations. shadow]
68- archiveFileName = " ${ project.name} -${ project.version} +${ project.minecraft_version } .jar"
75+ archiveFileName = " ${ project.name} -${ project.version} +${ minecraftVersion } .jar"
6976 destinationDirectory = layout. buildDirectory. dir(' dist' )
7077
71- relocate ' org.bstats' , ' com.krazzzzymonkey.cloudanarchycore .bstats'
72- relocate ' com.tcoded' , ' com.krazzzzymonkey.cloudanarchycore .tcoded'
78+ relocate ' org.bstats' , ' lol.hub .bstats'
79+ relocate ' com.tcoded' , ' lol.hub .tcoded'
7380
7481 // delete unshaded jar
7582 doLast {
7683 file(jar. archiveFile). delete()
7784 }
7885}
79- build . finalizedBy(shadowJar)
86+ tasks . named( ' build ' ) { finalizedBy(shadowJar) }
8087
8188tasks {
8289 runServer {
83- runDirectory = layout. projectDirectory. dir(' run' )
84- minecraftVersion(project . minecraft_version )
90+ runDirectory = project . layout. projectDirectory. dir(' run' )
91+ minecraftVersion(minecraftVersion )
8592 dependsOn(' build' )
8693 systemProperty(' com.mojang.eula.agree' , ' true' )
8794 downloadPlugins {
88- url(" https://github.com/ViaVersion/ViaBackwards/releases/download/5.3.2/ViaBackwards-5.3.2.jar" )
89- url(" https://github.com/ViaVersion/ViaVersion/releases/download/5.3.2/ViaVersion-5.3.2.jar" )
90- url(" https://github.com/dmulloy2/ProtocolLib/releases/download/5.3.0/ProtocolLib.jar" )
95+ url(" https://github.com/ViaVersion/ViaBackwards/releases/download/5.5.0/ViaBackwards-5.5.0.jar" )
96+ url(" https://github.com/ViaVersion/ViaVersion/releases/download/5.5.0/ViaVersion-5.5.0.jar" )
97+ url(" https://github.com/dmulloy2/ProtocolLib/releases/download/5.4.0/ProtocolLib.jar" )
98+ url(" https://ci.codemc.io/job/Updated-NoCheatPlus/job/Updated-NoCheatPlus/198/artifact/target/NoCheatPlus.jar" )
9199 }
92100 }
93101}
0 commit comments