-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does minimize() work for Kotlin projects? #688
Comments
You can use IntelliJs feature "Show Kotlin Bytecode" and then click Decompile to see the "resulting" Java class. I would expect this plugin to behave exactly as if this Java class would have been in the source code. From what I can see it is mostly:
so I could not trace where all these class files are being referenced. Maybe there is some way to show the tree of transitive classes being referenced? That would really help pin down why so many classes are still there. |
a71f84b Especially relevant: https://github.com/johnrengelman/shadow/blob/455d2346a23537817a156065ad868ec317cffb73/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/UnusedTracker.groovy#L26 |
I just noticed, this is a possible duplicate of #565 right? |
It's not related on #565 and not duplicate Support of R8 (requested in 565) is another issue, R8 does some things related to Kotlin, but those are just additional optimizations, it works for any JVM bytecode Though, both issues related on minification, I don't think that improvement of existing |
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
7.0.0
Gradle Version
7.1.1
Expected Behavior
shadowJar.minimize()
should work for Kotlin projects.Actual Behavior
I don't think it is.
Gradle Build Script(s)
And when I inspect the jar with
jar tf app/build/libs/app-1.0-all.jar
, I see files that I would not expect to be there if minification had taken place. In this case, I'd expect practically nothing to be there since what I have is a basically empty project: a simplemain()
method that printshello world
.Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)Output of
jar tf...
: https://gist.github.com/autonomousapps/615d7660479a34b31e2bfef1c0114861The text was updated successfully, but these errors were encountered: