This repository was archived by the owner on Jan 4, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/kotlin/gg/grounds Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,3 +42,6 @@ nb-configuration.xml
4242
4343# Ignore DevSpace cache and log folder
4444.devspace /
45+
46+ # Ignore kotlin folder
47+ .kotlin
Original file line number Diff line number Diff line change @@ -14,3 +14,11 @@ tasks.shadowJar {
1414 archiveClassifier.set(" " ) // Removes the 'all' classifier
1515 archiveVersion.set(" " ) // Removes the version from the jar name
1616}
17+
18+ tasks.processResources {
19+ inputs.property(" version" , project.version)
20+
21+ filesMatching(listOf (" **/plugin.yml" )) {
22+ expand(" VERSION" to project.version.toString())
23+ }
24+ }
Original file line number Diff line number Diff line change 11name : GroundsServerDiscovery
2- version : 1.0.0-SNAPSHOT
2+ version : ${VERSION}
33main : gg.grounds.GroundsPluginServerDiscovery
44
55api-version : 1.21
Original file line number Diff line number Diff line change 1- plugins { id(" com.gradleup.shadow" ) version " 9.3.0" }
1+ plugins {
2+ id(" com.gradleup.shadow" ) version " 9.3.0"
3+ id(" com.opencastsoftware.gradle.buildinfo" ) version " 0.3.1"
4+ }
25
36dependencies {
47 implementation(project(" :common" ))
@@ -15,3 +18,19 @@ tasks.shadowJar {
1518 archiveClassifier.set(" " ) // Removes the 'all' classifier
1619 archiveVersion.set(" " ) // Removes the version from the jar name
1720}
21+
22+ buildInfo {
23+ packageName.set(" gg.grounds" )
24+ className.set(" BuildInfo" )
25+ properties.set(mapOf (" version" to " ${project.version} " ))
26+ }
27+
28+ val generateBuildInfo: TaskProvider <Task > = tasks.named(" generateBuildInfo" )
29+
30+ tasks
31+ .matching { it.name == " kaptGenerateStubsKotlin" }
32+ .configureEach { dependsOn(generateBuildInfo) }
33+
34+ tasks.matching { it.name == " kaptKotlin" }.configureEach { dependsOn(generateBuildInfo) }
35+
36+ tasks.matching { it.name == " compileKotlin" }.configureEach { dependsOn(generateBuildInfo) }
Original file line number Diff line number Diff line change @@ -11,7 +11,14 @@ import gg.grounds.discovery.VelocityDiscoveryConfig
1111import gg.grounds.discovery.VelocityDiscoveryService
1212import org.slf4j.Logger
1313
14- @Plugin(id = " plugin-server-discovery" , name = " Grounds Server Discovery Plugin" )
14+ @Plugin(
15+ id = " plugin-server-discovery" ,
16+ name = " Grounds Server Discovery Plugin" ,
17+ version = BuildInfo .version,
18+ description = " Grounds server discovery plugin for Velocity" ,
19+ authors = [" Grounds Development Team and contributors" ],
20+ url = " https://github.com/groundsgg/plugin-server-discovery" ,
21+ )
1522class GroundsPluginServerDiscovery
1623@Inject
1724constructor (private val proxyServer: ProxyServer , private val logger: Logger ) {
You can’t perform that action at this time.
0 commit comments