Fix publishing

Co-authored-by: jmp <jasonpenilla2@me.com>
This commit is contained in:
KennyTV 2021-04-15 11:07:40 +02:00
parent f1eef0294f
commit d3a3e366b1
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 16 additions and 16 deletions

View File

@ -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<ShadowPlugin>()
subprojects {
publishing {
publications {
create<MavenPublication>("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<Jar> {

View File

@ -1,9 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.github.johnrengelman.shadow")
}
tasks {
withType<ShadowJar> {
archiveClassifier.set("")