ViaBackwards/universal/build.gradle.kts
2021-02-18 14:34:33 +01:00

25 lines
820 B
Plaintext

tasks {
val universalJar = register<Jar>("universalJar") {
artifacts.add("archives", this)
archiveClassifier.set("")
archiveFileName.set("ViaBackwards-${project.version}.jar")
destinationDirectory.set(rootProject.projectDir.resolve("build/libs"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
arrayOf(
"bukkit",
"bungee",
"sponge",
"velocity",
"fabric"
).forEach {
val subProject = rootProject.project(":viabackwards-$it")
val shadowJarTask = subProject.tasks.getByName("shadowJar")
from(zipTree(shadowJarTask.outputs.files.singleFile))
dependsOn(shadowJarTask)
}
}
build {
dependsOn(universalJar)
}
}