diff --git a/surf-api-velocity/surf-api-velocity-server/build.gradle.kts b/surf-api-velocity/surf-api-velocity-server/build.gradle.kts index 4eb6adfc..888501be 100644 --- a/surf-api-velocity/surf-api-velocity-server/build.gradle.kts +++ b/surf-api-velocity/surf-api-velocity-server/build.gradle.kts @@ -1,6 +1,7 @@ plugins { `core-convention` kotlin("kapt") + id("com.github.gmazzo.buildconfig") version "6.0.9" } dependencies { @@ -31,4 +32,9 @@ description = "surf-api-velocity-server" kapt { keepJavacAnnotationProcessors = true +} + +buildConfig { + packageName("dev.slne.surf.api.velocity.server.generated") + buildConfigField("VERSION", project.version.toString()) } \ No newline at end of file diff --git a/surf-api-velocity/surf-api-velocity-server/src/main/kotlin/dev/slne/surf/api/velocity/server/VelocityMain.kt b/surf-api-velocity/surf-api-velocity-server/src/main/kotlin/dev/slne/surf/api/velocity/server/VelocityMain.kt index a3e21de5..d38e904c 100644 --- a/surf-api-velocity/surf-api-velocity-server/src/main/kotlin/dev/slne/surf/api/velocity/server/VelocityMain.kt +++ b/surf-api-velocity/surf-api-velocity-server/src/main/kotlin/dev/slne/surf/api/velocity/server/VelocityMain.kt @@ -10,6 +10,7 @@ import com.velocitypowered.api.plugin.PluginContainer import com.velocitypowered.api.plugin.annotation.DataDirectory import com.velocitypowered.api.proxy.ProxyServer import dev.slne.surf.api.core.server.CoreInstance +import dev.slne.surf.api.velocity.server.generated.BuildConfig import kotlinx.coroutines.runBlocking import org.slf4j.Logger import java.nio.file.Path @@ -18,9 +19,9 @@ import java.util.concurrent.ExecutorService @Plugin( id = "surf-api-velocity", name = "Surf API Velocity", - version = "3.2.1", + version = BuildConfig.VERSION, description = "The Surf API Velocity plugin.", - authors = ["twisti"], + authors = ["twisti", "SLNE Development Team"], dependencies = [Dependency(id = "packetevents"), Dependency(id = "commandapi"), Dependency(id = "luckperms")] ) class VelocityMain @Inject constructor(