Skip to content

Commit

Permalink
Fix build configuration cyclic error
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilCCMG committed Dec 14, 2023
1 parent d4b68b3 commit 96857f4
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions worldedit-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,15 @@ tasks.named<Jar>("jar") {
addJarManifest(WorldEditKind.Plugin, includeClasspath = true)

tasks.named<ShadowJar>("shadowJar") {
dependsOn(project.project(":worldedit-bukkit:adapters").subprojects.map { it.tasks.named("assemble") })
from(Callable {
adapters.resolve()
.map { f ->
zipTree(f).matching {
exclude("META-INF/")
}
}
})
configurations.add(adapters)
archiveFileName.set("${rootProject.name}-Bukkit-${project.version}.${archiveExtension.getOrElse("jar")}")
dependencies {
// In tandem with not bundling log4j, we shouldn't relocate base package here.
// relocate("org.apache.logging", "com.sk89q.worldedit.log4j")
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")

exclude(dependency("$group:$name"))

include(dependency(":worldedit-core"))
include(dependency(":worldedit-libs:bukkit"))
// Purposefully not included, we assume (even though no API exposes it) that Log4J will be present at runtime
Expand Down Expand Up @@ -192,6 +187,15 @@ tasks.named<ShadowJar>("shadowJar") {
include(dependency("org.anarres:parallelgzip:1.0.5"))
}
}

project.project(":worldedit-bukkit:adapters").subprojects.forEach {
dependencies {
include(dependency("${it.group}:${it.name}"))
}
minimize {
exclude(dependency("${it.group}:${it.name}"))
}
}
}

tasks.named("assemble").configure {
Expand Down

0 comments on commit 96857f4

Please sign in to comment.