diff --git a/build.gradle.kts b/build.gradle.kts index 77d156332..faa685b53 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -54,7 +54,23 @@ subprojects { withSourcesJar() withJavadocJar() } +} +// Configure shadow tasks before the publishing task +sequenceOf( + projects.viaversionBukkit, + projects.viaversionBungee, + projects.viaversionFabric, + projects.viaversionSponge, + projects.viaversionVelocity +).map { it.dependencyProject }.forEach { project -> + project.configureShadowJar() +} + +projects.viaversionApi.dependencyProject.configureShadowJarAPI() +projects.viaversion.dependencyProject.apply() + +subprojects { publishing { publications { create("mavenJava") { @@ -80,18 +96,6 @@ subprojects { } } -sequenceOf( - projects.viaversionBukkit, - projects.viaversionBungee, - projects.viaversionFabric, - projects.viaversionSponge, - projects.viaversionVelocity -).map { it.dependencyProject }.forEach { project -> - project.configureShadowJar() -} - -projects.viaversionApi.dependencyProject.configureShadowJarAPI() - tasks { // root project has no useful artifacts withType { diff --git a/universal/build.gradle.kts b/universal/build.gradle.kts index 911bb8f25..dcc0411bb 100644 --- a/universal/build.gradle.kts +++ b/universal/build.gradle.kts @@ -1,9 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -plugins { - id("com.github.johnrengelman.shadow") -} - tasks { withType { archiveClassifier.set("")