Skip to content

Commit

Permalink
Use normal jar for runClient/runServer
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Dec 24, 2023
1 parent e9272a9 commit 47da8d8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -959,22 +959,13 @@ if (usesShadowedDependencies.toBoolean()) {
configurations.apiElements.outgoing.artifacts.clear()
configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
tasks.named("jar", Jar) {
enabled = false
finalizedBy(tasks.shadowJar)
}
tasks.named("reobfJar", ReobfuscatedJar) {
inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
}
AdhocComponentWithVariants javaComponent = (AdhocComponentWithVariants) project.components.findByName("java")
javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}
for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
tasks.named(runTask).configure {
dependsOn("shadowJar")
}
}
}
ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar
ext.publishableObfJar = tasks.reobfJar
Expand Down

0 comments on commit 47da8d8

Please sign in to comment.