Relocate shadow deps

This commit is contained in:
comp500 2021-02-07 14:02:10 +00:00
parent 226e754547
commit 6d47c0d61f

View File

@ -51,12 +51,22 @@ tasks.jar {
} }
} }
// TODO: build relocated jar for minecraft launcher lib, non-relocated jar for packwiz-installer
tasks.register<com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation>("relocateShadowJar") {
target = tasks.shadowJar.get()
prefix = "link.infra.packwiz.deps"
}
// Commons CLI and Minimal JSON are already included in packwiz-installer-bootstrap // Commons CLI and Minimal JSON are already included in packwiz-installer-bootstrap
tasks.shadowJar { tasks.shadowJar {
dependencies { dependencies {
exclude(dependency("commons-cli:commons-cli:1.4")) //exclude(dependency("commons-cli:commons-cli:1.4"))
exclude(dependency("com.eclipsesource.minimal-json:minimal-json:0.9.5")) exclude(dependency("com.eclipsesource.minimal-json:minimal-json:0.9.5"))
// TODO: exclude meta inf files
} }
exclude("**/*.kotlin_metadata")
exclude("**/*.kotlin_builtins")
dependsOn(tasks.named("relocateShadowJar"))
} }
tasks.register<proguard.gradle.ProGuardTask>("shrinkJar") { tasks.register<proguard.gradle.ProGuardTask>("shrinkJar") {