diff --git a/distributor-api/build.gradle.kts b/distributor-api/build.gradle.kts index 053e9862..8b0e3b5a 100644 --- a/distributor-api/build.gradle.kts +++ b/distributor-api/build.gradle.kts @@ -14,6 +14,7 @@ dependencies { val slf4j = "2.0.3" api("org.slf4j:slf4j-api:$slf4j") + testRuntimeOnly("org.slf4j:slf4j-simple:$slf4j") val geantyref = "1.3.13" api("io.leangen.geantyref:geantyref:$geantyref") diff --git a/distributor-core/build.gradle.kts b/distributor-core/build.gradle.kts index a3838bb3..d4ac11fe 100644 --- a/distributor-core/build.gradle.kts +++ b/distributor-core/build.gradle.kts @@ -8,7 +8,6 @@ dependencies { implementation(project(":distributor-api")) implementation("org.spongepowered:configurate-yaml:4.1.2") implementation("org.aeonbits.owner:owner-java8:1.0.12") - annotationProcessor("cloud.commandframework:cloud-annotations:${Versions.cloud}") } @@ -20,11 +19,26 @@ metadata.displayName = "Distributor" metadata.main = "fr.xpdustry.distributor.core.DistributorPlugin" tasks.shadowJar { + archiveClassifier.set("plugin") + doFirst { val temp = temporaryDir.resolve("plugin.json") temp.writeText(metadata.toJson(true)) from(temp) } + + minimize { + exclude(dependency("fr.xpdustry:distributor-.*:.*")) + exclude(dependency("cloud.commandframework:cloud-.*:.*")) + exclude(dependency("org.slf4j:slf4j-api:.*")) + exclude(dependency("io.leangen.geantyref:geantyref:.*")) + } + + val shadowPackage = "fr.xpdustry.distributor.core.internal.shadow" + relocate("org.spongepowered.configurate", "$shadowPackage.configurate") + relocate("org.aeonbits.owner", "$shadowPackage.owner") + relocate("org.yaml.snakeyaml", "$shadowPackage.snakeyaml") + from(rootProject.file("LICENSE.md")) { into("META-INF") }