1 Commits
Author SHA1 Message Date
Jason Penilla f4b03c6bf0 Shade and relocate cloud 2024-08-06 13:44:54 -07:00
+17
View File
@@ -5,6 +5,9 @@ plugins {
id("io.papermc.paperweight.userdev") version "1.7.2"
id("xyz.jpenilla.run-paper") version "2.3.0" // Adds runServer and runMojangMappedServer tasks for testing
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.1.1" // Generates plugin.yml based on the Gradle config
// Shades and relocates dependencies into our plugin jar. See https://imperceptiblethoughts.com/shadow/introduction/
id("io.github.goooler.shadow") version "8.1.7"
}
group = "io.papermc.paperweight"
@@ -33,6 +36,11 @@ dependencies {
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
// paperweight.foliaDevBundle("1.21-R0.1-SNAPSHOT")
// paperweight.devBundle("com.example.paperfork", "1.21-R0.1-SNAPSHOT")
// Shadow will include the runtimeClasspath by default, which implementation adds to.
// Dependencies you don't want to include go in the compileOnly configuration.
// Make sure to relocate shaded dependencies!
implementation("org.incendo", "cloud-paper", "2.0.0-beta.8")
}
tasks {
@@ -53,6 +61,15 @@ tasks {
outputJar = layout.buildDirectory.file("libs/PaperweightTestPlugin-${project.version}.jar")
}
*/
shadowJar {
// helper function to relocate a package into our package
fun reloc(pkg: String) = relocate(pkg, "io.papermc.paperweight.testplugin.dependency.$pkg")
// relocate cloud and it's transitive dependencies
reloc("org.incendo.cloud")
reloc("io.leangen.geantyref")
}
}
// Configure plugin.yml generation