3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00
ViaBackwards/universal/build.gradle.kts
KennyTV fad65e5b81
Update gradle build files
Co-authored-by: jmp <jasonpenilla2@me.com>
2021-04-14 14:19:28 +02:00

30 Zeilen
1.0 KiB
Plaintext

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.github.johnrengelman.shadow")
}
tasks {
withType<ShadowJar> {
archiveClassifier.set("")
archiveFileName.set("ViaBackwards-${project.version}.jar")
destinationDirectory.set(rootProject.projectDir.resolve("build/libs"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
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)
dependsOn(shadowJarTask)
dependsOn(subproject.tasks.withType<Jar>())
from(zipTree(shadowJarTask.archiveFile))
}
}
build {
dependsOn(withType<ShadowJar>())
}
}