Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ nb-configuration.xml

# Ignore DevSpace cache and log folder
.devspace/

# Ignore kotlin folder
.kotlin
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ allprojects {
it.setBlockIndent(4)
it.setContinuationIndent(4)
}
targetExclude("**/build/**")
}
kotlinGradle {
ktfmt().googleStyle().configure {
it.setBlockIndent(4)
it.setContinuationIndent(4)
}
targetExclude("**/build/**")
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions paper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ tasks.shadowJar {
archiveClassifier.set("") // Removes the 'all' classifier
archiveVersion.set("") // Removes the version from the jar name
}

val pluginVersion = project.version.toString()

tasks.processResources {
inputs.property("version", project.version)

filesMatching(listOf("**/plugin.yml")) { expand("VERSION" to pluginVersion) }
}
4 changes: 2 additions & 2 deletions paper/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: GroundsServerDiscovery
version: 1.0.0-SNAPSHOT
version: ${VERSION}
main: gg.grounds.GroundsPluginServerDiscovery

api-version: 1.21
api-version: 1.21
14 changes: 13 additions & 1 deletion velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
plugins { id("com.gradleup.shadow") version "9.3.0" }
plugins {
id("com.gradleup.shadow") version "9.3.0"
id("com.github.gmazzo.buildconfig") version "6.0.7"
}

dependencies {
implementation(project(":common"))
Expand All @@ -15,3 +18,12 @@ tasks.shadowJar {
archiveClassifier.set("") // Removes the 'all' classifier
archiveVersion.set("") // Removes the version from the jar name
}

buildConfig {
className("BuildInfo")
packageName("gg.grounds")

useKotlinOutput()

buildConfigField("String", "VERSION", "\"${project.version}\"")
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ import gg.grounds.discovery.VelocityDiscoveryConfig
import gg.grounds.discovery.VelocityDiscoveryService
import org.slf4j.Logger

@Plugin(id = "plugin-server-discovery", name = "Grounds Server Discovery Plugin")
@Plugin(
id = "plugin-server-discovery",
name = "Grounds Server Discovery Plugin",
version = BuildInfo.VERSION,
description = "Grounds server discovery plugin for Velocity",
authors = ["Grounds Development Team and contributors"],
url = "https://github.com/groundsgg/plugin-server-discovery",
)
class GroundsPluginServerDiscovery
@Inject
constructor(private val proxyServer: ProxyServer, private val logger: Logger) {
Expand Down