2021-02-23 11:29:18 +01:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
2021-02-18 14:34:33 +01:00
|
|
|
tasks {
|
2021-02-23 11:29:18 +01:00
|
|
|
withType<ShadowJar> {
|
2021-02-18 14:34:33 +01:00
|
|
|
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 {
|
2021-02-23 11:29:18 +01:00
|
|
|
dependsOn(withType<ShadowJar>())
|
|
|
|
}
|
2021-02-18 14:34:33 +01:00
|
|
|
}
|