Skip to content

Commit

Permalink
Merge pull request #1042 from booky10/fix/bstats-shadow-issues
Browse files Browse the repository at this point in the history
Include relocated bstats classes in published shadow jar
  • Loading branch information
retrooper authored Oct 28, 2024
2 parents fc31b7d + 4ffcbca commit f66626a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ plugins {
com.gradleup.shadow
}

val compileShadowOnly: Configuration by configurations.creating {
configurations.compileOnly.get().extendsFrom(this)
}

tasks {
shadowJar {
configurations.add(compileShadowOnly)

archiveFileName = "packetevents-${project.name}-${rootProject.ext["versionNoHash"]}.jar"
archiveClassifier = null

Expand Down
2 changes: 1 addition & 1 deletion bungeecord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
dependencies {
compileOnly(libs.bungeecord)
shadow(libs.bundles.adventure)
shadow(libs.bstats.bungeecord)
compileShadowOnly(libs.bstats.bungeecord)
shadow(project(":api", "shadow"))
shadow(project(":netty-common"))
}
2 changes: 1 addition & 1 deletion spigot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {
dependencies {
compileOnly(libs.netty)
shadow(libs.bundles.adventure)
shadow(libs.bstats.bukkit)
compileShadowOnly(libs.bstats.bukkit)
shadow(project(":api", "shadow"))
shadow(project(":netty-common"))

Expand Down
2 changes: 1 addition & 1 deletion sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
}
shadow(project(":api", "shadow"))
shadow(project(":netty-common"))
shadow(libs.bstats.sponge)
compileShadowOnly(libs.bstats.sponge)

compileOnly(libs.via.version)
}
4 changes: 2 additions & 2 deletions velocity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
annotationProcessor(libs.velocity)
shadow(project(":api", "shadow"))
shadow(project(":netty-common"))
shadow(libs.bstats.velocity)
compileShadowOnly(libs.bstats.velocity)
// Velocity already bundles with adventure
}

Expand All @@ -29,4 +29,4 @@ tasks {
languageVersion = JavaLanguageVersion.of(21)
}
}
}
}

0 comments on commit f66626a

Please sign in to comment.