2021-02-23 11:29:18 +01:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
2021-04-14 13:58:59 +02:00
|
|
|
plugins {
|
|
|
|
id("com.github.johnrengelman.shadow")
|
|
|
|
}
|
|
|
|
|
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
|
2021-04-14 13:58:59 +02:00
|
|
|
sequenceOf(
|
|
|
|
rootProject.projects.viabackwardsBukkit,
|
|
|
|
rootProject.projects.viabackwardsBungee,
|
|
|
|
rootProject.projects.viabackwardsFabric,
|
|
|
|
rootProject.projects.viabackwardsSponge,
|
|
|
|
rootProject.projects.viabackwardsVelocity,
|
|
|
|
).map { it.dependencyProject }.forEach { subproject ->
|
|
|
|
val shadowJarTask = subproject.tasks.getByName("shadowJar", ShadowJar::class)
|
2021-02-18 14:34:33 +01:00
|
|
|
dependsOn(shadowJarTask)
|
2021-04-14 13:58:59 +02:00
|
|
|
dependsOn(subproject.tasks.withType<Jar>())
|
|
|
|
from(zipTree(shadowJarTask.archiveFile))
|
2021-02-18 14:34:33 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
build {
|
2021-02-23 11:29:18 +01:00
|
|
|
dependsOn(withType<ShadowJar>())
|
|
|
|
}
|
2021-02-18 14:34:33 +01:00
|
|
|
}
|