Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +01:00
867cf6da05
* Use JiJ inclusion for Fabric/NeoForge to prevent mod conflicts. Further: Don't publish shadow jars to maven. * Shade and relocate dependencies that don't conform to SemVer on Fabric * Shade/Relocate dependencies on Fabric to avoid version warnings * Use relocate function from the build-logic plugin
36 Zeilen
976 B
Plaintext
36 Zeilen
976 B
Plaintext
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
plugins {
|
|
id("geyser.base-conventions")
|
|
id("com.github.johnrengelman.shadow")
|
|
}
|
|
|
|
tasks {
|
|
named<Jar>("jar") {
|
|
from(project.rootProject.file("LICENSE"))
|
|
}
|
|
val shadowJar = named<ShadowJar>("shadowJar") {
|
|
archiveBaseName.set(project.name)
|
|
archiveVersion.set("")
|
|
archiveClassifier.set("")
|
|
|
|
val sJar: ShadowJar = this
|
|
|
|
doFirst {
|
|
providedDependencies[project.name]?.forEach { string ->
|
|
sJar.dependencies {
|
|
println("Excluding $string from ${project.name}")
|
|
exclude(dependency(string))
|
|
}
|
|
}
|
|
|
|
sJar.dependencies {
|
|
exclude(dependency("org.checkerframework:checker-qual:.*"))
|
|
exclude(dependency("org.jetbrains:annotations:.*"))
|
|
}
|
|
}
|
|
}
|
|
named("build") {
|
|
dependsOn(shadowJar)
|
|
}
|
|
} |