Skip to content

Commit

Permalink
Use normal jar for runClient/runServer (#244)
Browse files Browse the repository at this point in the history
* Use normal jar for runClient/runServer

* Ensure jar has unique classifier

---------

Co-authored-by: Raven Szewczyk <git@eigenraven.me>
  • Loading branch information
embeddedt and eigenraven authored Jan 1, 2024
1 parent 6b492c1 commit bbdc475
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,7 @@ if (usesShadowedDependencies.toBoolean()) {
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)
archiveClassifier.set('dev-preshadow')
}
tasks.named("reobfJar", ReobfuscatedJar) {
inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
Expand All @@ -971,11 +970,6 @@ if (usesShadowedDependencies.toBoolean()) {
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 bbdc475

Please sign in to comment.