Skip to content

Commit db0232e

Browse files
committed
fix: final addon jars not being the shaded version for most addons
Fixes ClassDefNotFoundException
1 parent 8bb7cce commit db0232e

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

build.gradle.kts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ subprojects {
2323
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
2424
}
2525
dependencies {
26-
compileOnly(rootProject.libs.serverassistantai) {
27-
exclude("com.discordsrv")
28-
}
26+
compileOnly(rootProject.libs.serverassistantai)
2927
compileOnly(rootProject.libs.spigot)
3028
compileOnly(rootProject.libs.lombok)
3129
annotationProcessor(rootProject.libs.lombok)
@@ -60,10 +58,10 @@ gradle.projectsEvaluated {
6058
archiveBaseName = bukkit.name
6159
}
6260
}
63-
tasks.build {
64-
dependsOn(tasks.withType(ShadowJar::class.java))
65-
}
6661
if (plugins.hasPlugin("com.gradleup.shadow")) {
62+
tasks.build {
63+
dependsOn(tasks.withType(ShadowJar::class.java))
64+
}
6765
tasks.withType(ShadowJar::class.java) {
6866
finalizedBy(copyBuildOutput)
6967
archiveClassifier.set("")
@@ -75,17 +73,13 @@ gradle.projectsEvaluated {
7573
)
7674
}
7775
}
78-
} else {
79-
tasks.build.get().finalizedBy(copyBuildOutput)
8076
}
8177
}
8278
}
8379

8480
val outputDir = file("out")
8581

8682
val copyBuildOutput by tasks.registering {
87-
dependsOn(subprojects.map { it.tasks.build.get() })
88-
8983
doLast {
9084
subprojects.forEach { sp ->
9185
val buildLibsDir = sp.layout.buildDirectory.get().dir("libs").asFile

0 commit comments

Comments
 (0)