Add an option to not minimize shadowed dependencies (#110)

This commit is contained in:
Raven Szewczyk authored and GitHub committed 2023-01-22 18:37:18 +01:00
1 parent 3717cbd301
commit 45fb6ac7e9
2 files changed
+12 -4

No files matched your search

+8 -3
View File
@@ -1,4 +1,4 @@
//version: 1673027205
//version: 1674294951
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -144,6 +144,7 @@ propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
propertyDefaultIfUnset("curseForgeRelations", "")
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
@@ -411,7 +412,9 @@ shadowJar {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
if (minimizeShadowedDependencies.toBoolean()) {
minimize() // This will only allow shading for actually used classes
}
configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
@@ -554,7 +557,9 @@ task shadowDevJar(type: ShadowJar) {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
if (minimizeShadowedDependencies.toBoolean()) {
minimize() // This will only allow shading for actually used classes
}
configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
+4 -1
View File
@@ -71,6 +71,9 @@ forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
@@ -114,4 +117,4 @@ curseForgeRelations =
# Uncomment this to disable spotless checks
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
# disableSpotless = true