From 778a77d1217bfe17dfda58e92d2e73c2276b4b80 Mon Sep 17 00:00:00 2001 From: Lukas Jost Date: Sun, 17 May 2026 17:17:46 +0200 Subject: [PATCH] feat: migrate plugin config to runtime consumer --- build.gradle.kts | 2 +- common/build.gradle.kts | 2 +- paper/build.gradle.kts | 8 ++------ paper/src/main/resources/plugin.yml | 2 ++ settings.gradle.kts | 1 + velocity/build.gradle.kts | 8 ++------ .../main/kotlin/gg/grounds/config/ConfigVelocityPlugin.kt | 2 ++ 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 85fc847..a11ee09 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1 +1 @@ -plugins { id("gg.grounds.base-conventions") version "0.5.1" } +plugins { id("gg.grounds.base-conventions") version "0.6.0-runtime-SNAPSHOT" } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 2238004..2e2b0b6 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -14,10 +14,10 @@ repositories { dependencies { protobuf("gg.grounds:library-grpc-contracts-config:0.2.0") compileOnly("org.slf4j:slf4j-api:2.0.17") - implementation("com.google.protobuf:protobuf-java:4.34.1") implementation("io.nats:jnats:2.25.2") implementation("tools.jackson.core:jackson-databind:3.1.2") implementation("tools.jackson.module:jackson-module-kotlin:3.1.2") testImplementation("org.slf4j:slf4j-api:2.0.17") + testImplementation("com.google.protobuf:protobuf-java:4.34.1") testImplementation(kotlin("test")) } diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 179bfc8..5237b18 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -1,7 +1,3 @@ -plugins { id("gg.grounds.paper-conventions") } +plugins { id("gg.grounds.paper-runtime-consumer-conventions") } -dependencies { - implementation(project(":common")) - implementation("io.grpc:grpc-netty-shaded:1.80.0") - implementation("io.grpc:grpc-stub:1.80.0") -} +dependencies { implementation(project(":common")) } diff --git a/paper/src/main/resources/plugin.yml b/paper/src/main/resources/plugin.yml index 4fbf049..fa2bc5a 100644 --- a/paper/src/main/resources/plugin.yml +++ b/paper/src/main/resources/plugin.yml @@ -5,3 +5,5 @@ author: Grounds Development Team and contributors main: gg.grounds.config.ConfigPaperPlugin api-version: "1.21" +depend: + - GroundsPluginRuntime diff --git a/settings.gradle.kts b/settings.gradle.kts index 19cdecc..7337850 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,6 +4,7 @@ include("common", "velocity", "paper", "example-paper", "example-velocity") pluginManagement { repositories { + mavenLocal() maven { url = uri("https://maven.pkg.github.com/groundsgg/*") credentials { diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index 2bf44ca..531fcb8 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -1,7 +1,3 @@ -plugins { id("gg.grounds.velocity-conventions") } +plugins { id("gg.grounds.velocity-runtime-consumer-conventions") } -dependencies { - implementation(project(":common")) - implementation("io.grpc:grpc-netty-shaded:1.80.0") - implementation("io.grpc:grpc-stub:1.80.0") -} +dependencies { implementation(project(":common")) } diff --git a/velocity/src/main/kotlin/gg/grounds/config/ConfigVelocityPlugin.kt b/velocity/src/main/kotlin/gg/grounds/config/ConfigVelocityPlugin.kt index abbc474..d973b99 100644 --- a/velocity/src/main/kotlin/gg/grounds/config/ConfigVelocityPlugin.kt +++ b/velocity/src/main/kotlin/gg/grounds/config/ConfigVelocityPlugin.kt @@ -4,6 +4,7 @@ import com.google.inject.Inject import com.velocitypowered.api.event.Subscribe import com.velocitypowered.api.event.proxy.ProxyInitializeEvent import com.velocitypowered.api.event.proxy.ProxyShutdownEvent +import com.velocitypowered.api.plugin.Dependency import com.velocitypowered.api.plugin.Plugin import com.velocitypowered.api.plugin.annotation.DataDirectory import com.velocitypowered.api.proxy.ProxyServer @@ -22,6 +23,7 @@ import org.slf4j.Logger description = "Runtime configuration management for Velocity", authors = ["Grounds Development Team and contributors"], url = "https://github.com/groundsgg/plugin-config", + dependencies = [Dependency(id = "plugin-grounds-runtime")], ) class ConfigVelocityPlugin @Inject