11import groovy.lang.Closure
22import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
3- import com.palantir.gradle.gitversion.VersionDetails
43import org.gradle.api.tasks.compile.JavaCompile
54import org.gradle.language.jvm.tasks.ProcessResources
65import xyz.jpenilla.runpaper.task.RunServer
7- import xyz.jpenilla.runwaterfall.task.RunWaterfall
86import xyz.jpenilla.runvelocity.task.RunVelocity
7+ import xyz.jpenilla.runwaterfall.task.RunWaterfall
98
109
1110
@@ -14,13 +13,12 @@ val PLUGIN_NAME = "ASLEaglerHook"
1413val PLUGIN_IDEN = " asleaglerhook"
1514val PLUGIN_DOMN = " xyz.webmc.$PLUGIN_IDEN "
1615val PLUGIN_DESC = " An EaglerXServer addon to display the AdvancedServerList MOTD."
17- val PLUGIN_VERS = " 1.0.1 "
16+ val PLUGIN_VERS = " 1.0.2 "
1817val PLUGIN_SITE = " https://github.com/WebMCDevelopment/$PLUGIN_IDEN "
1918val PLUGIN_DEPA = listOf (" EaglercraftXServer" , " AdvancedServerList" )
2019val PLUGIN_DEPB = listOf (" eaglerxserver" , " advancedserverlist" )
2120val PLUGIN_SDPA = listOf (" PAPIProxyBridge" , " Maintenance" )
2221val PLUGIN_SDPB = listOf (" papiproxybridge" , " maintenance" )
23- val PLUGIN_PROV = emptyList<String >()
2422val PLUGIN_ATHR = listOf (" Colbster937" )
2523val PLUGIN_CTBR = emptyList<String >()
2624
@@ -30,7 +28,6 @@ val PLUGIN_CTBR = emptyList<String>()
3028val PLUGIN_DEPA_J = getBungeeDeps(PLUGIN_DEPA )
3129val PLUGIN_DEPB_J = getVelocityDeps(PLUGIN_DEPB , PLUGIN_SDPB )
3230val PLUGIN_SDPA_J = getBungeeDeps(PLUGIN_SDPA )
33- val PLUGIN_PROV_J = getBungeeDeps(PLUGIN_PROV )
3431val PLUGIN_ATHR_J = getBungeeDeps(PLUGIN_ATHR )
3532val PLUGIN_CTBR_J = getBungeeDeps(PLUGIN_CTBR )
3633
@@ -43,14 +40,11 @@ val MTNCE_VER = "4.2.1"
4340plugins {
4441 id(" java" )
4542 id(" com.gradleup.shadow" ) version " 9.3.1"
46- id(" com.palantir.git-version" ) version " 4.2 .0"
43+ id(" com.palantir.git-version" ) version " 4.3 .0"
4744 id(" xyz.jpenilla.run-velocity" ) version " 3.0.2"
4845 id(" xyz.jpenilla.run-waterfall" ) version " 3.0.2"
4946}
5047
51- @Suppress(" UNCHECKED_CAST" )
52- val GIT_INFO = (extra[" versionDetails" ] as Closure <VersionDetails >)()
53-
5448repositories {
5549 mavenCentral()
5650 maven(" https://repo.papermc.io/repository/maven-public/" )
@@ -63,7 +57,7 @@ repositories {
6357}
6458
6559dependencies {
66- compileOnly(" com.velocitypowered:velocity-api:3.4 .0-SNAPSHOT" )
60+ compileOnly(" com.velocitypowered:velocity-api:3.5 .0-SNAPSHOT" )
6761 compileOnly(" net.md-5:bungeecord-api:1.21-R0.5-SNAPSHOT" )
6862 compileOnly(" net.lax1dude.eaglercraft.backend:api-velocity:1.0.0" )
6963 compileOnly(" net.lax1dude.eaglercraft.backend:api-bungee:1.0.0" )
@@ -96,18 +90,15 @@ val BUILD_PROPS = mapOf(
9690 " plugin_depa" to PLUGIN_DEPA_J ,
9791 " plugin_depb" to PLUGIN_DEPB_J ,
9892 " plugin_sdpa" to PLUGIN_SDPA_J ,
99- " plugin_prov" to PLUGIN_PROV_J ,
10093 " plugin_athr" to PLUGIN_ATHR_J ,
10194 " plugin_ctbr" to PLUGIN_CTBR_J ,
102- " git_cm_hash" to GIT_INFO .gitHashFull,
10395)
10496
105- tasks.withType<JavaCompile >().configureEach {
106- options.encoding = " UTF-8"
97+ tasks.named<JavaCompile >(" compileJava" ) {
10798 options.release.set(21 )
10899}
109100
110- tasks.withType <ProcessResources >().configureEach {
101+ tasks.named <ProcessResources >(" processResources " ) {
111102 duplicatesStrategy = DuplicatesStrategy .EXCLUDE
112103 outputs.upToDateWhen { false }
113104
@@ -117,25 +108,14 @@ tasks.withType<ProcessResources>().configureEach {
117108 }
118109 }
119110
120- doLast {
121- val file = destinationDir.resolve(" build.properties" )
122- file.parentFile.mkdirs()
123- file.writeText(
124- BUILD_PROPS .entries.joinToString(" \n " ) { (k, v) ->
125- " $k = $v "
126- }
127- )
128- }
129-
130111 inputs.files(tasks.named<JavaCompile >(" compileJava" ).map { it.outputs.files })
131112}
132113
133- tasks.withType <Jar >().configureEach {
114+ tasks.named <Jar >(" jar " ) {
134115 enabled = false
135116}
136117
137- tasks.withType<ShadowJar >().configureEach {
138- enabled = true
118+ tasks.named<ShadowJar >(" shadowJar" ) {
139119 doFirst {
140120 delete(layout.buildDirectory.dir(" libs" ))
141121 mkdir(layout.buildDirectory.dir(" libs" ))
@@ -155,25 +135,25 @@ tasks.register("printVars") {
155135 }
156136}
157137
158- tasks.withType< RunWaterfall >().configureEach {
159- waterfallVersion( " 1.21 " )
160- runDirectory.set(layout.projectDirectory.dir(" run/waterfall " ))
138+ tasks.named< RunVelocity >( " runVelocity " ) {
139+ velocityVersion( " 3.5.0-SNAPSHOT " )
140+ runDirectory.set(layout.projectDirectory.dir(" run/velocity " ))
161141 downloadPlugins {
162142 github(" lax1dude" , " eaglerxserver" , " v" + EAGXS_VER , " EaglerXServer.jar" )
163- url(" https://codeberg.org/Andre601/AdvancedServerList/releases/download/v$ASLPL_VER /AdvancedServerList-BungeeCord -$ASLPL_VER .jar" )
164- github(" WiIIiam278" , " PAPIProxyBridge" , PAPIP_VER , " PAPIProxyBridge-Bungee -" + PAPIP_VER + " .jar" )
165- github(" kennytv" , " Maintenance" , MTNCE_VER , " Maintenance-" + MTNCE_VER + " .jar" )
143+ url(" https://codeberg.org/Andre601/AdvancedServerList/releases/download/v$ASLPL_VER /AdvancedServerList-Velocity -$ASLPL_VER .jar" )
144+ github(" WiIIiam278" , " PAPIProxyBridge" , PAPIP_VER , " PAPIProxyBridge-Velocity -" + PAPIP_VER + " .jar" )
145+ github(" kennytv" , " Maintenance" , MTNCE_VER , " Maintenance-Velocity- " + MTNCE_VER + " .jar" )
166146 }
167147}
168148
169- tasks.withType< RunVelocity >().configureEach {
170- velocityVersion( " 3.4.0-SNAPSHOT " )
171- runDirectory.set(layout.projectDirectory.dir(" run/velocity " ))
149+ tasks.named< RunWaterfall >( " runWaterfall " ) {
150+ waterfallVersion( " 1.21 " )
151+ runDirectory.set(layout.projectDirectory.dir(" run/waterfall " ))
172152 downloadPlugins {
173153 github(" lax1dude" , " eaglerxserver" , " v" + EAGXS_VER , " EaglerXServer.jar" )
174- url(" https://codeberg.org/Andre601/AdvancedServerList/releases/download/v$ASLPL_VER /AdvancedServerList-Velocity -$ASLPL_VER .jar" )
175- github(" WiIIiam278" , " PAPIProxyBridge" , PAPIP_VER , " PAPIProxyBridge-Velocity -" + PAPIP_VER + " .jar" )
176- github(" kennytv" , " Maintenance" , MTNCE_VER , " Maintenance-Velocity- " + MTNCE_VER + " .jar" )
154+ url(" https://codeberg.org/Andre601/AdvancedServerList/releases/download/v$ASLPL_VER /AdvancedServerList-BungeeCord -$ASLPL_VER .jar" )
155+ github(" WiIIiam278" , " PAPIProxyBridge" , PAPIP_VER , " PAPIProxyBridge-Bungee -" + PAPIP_VER + " .jar" )
156+ github(" kennytv" , " Maintenance" , MTNCE_VER , " Maintenance-" + MTNCE_VER + " .jar" )
177157 }
178158}
179159
0 commit comments