You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a multi-module project, core depends on the api module, and both core and api have some third-party dependencies(For example Kotlin std library). And, I implemented these 2 modules in the root project's build script and want to package them into a jar.
The problem is, when I add minimize() to the shadowjar task, it reduces all my code, it seems that it thinks that the subproject is also a third-party dependency.
shadowJar {
relocate 'kotlin', 'lib.kotlin'
relocate 'org.jetbrains', 'lib.org.jetbrains'// minimize will remove the :core and :api module?
minimize()
}
Its minimize() feature, the only part I care about, seems badly broken. The project is looking unmaintained, also; this issue about the same thing from 9 months ago has no response. GradleUp/shadow#744
I recently converted my project to a multi-module project, but I'm having trouble using shadowjar's minimize feature. Here is my project structure:
This is a multi-module project,
core
depends on theapi
module, and both core and api have some third-party dependencies(For example Kotlin std library). And, I implemented these 2 modules in the root project's build script and want to package them into a jar.The problem is, when I add minimize() to the shadowjar task, it reduces all my code, it seems that it thinks that the subproject is also a third-party dependency.
I also tried add exclude statement into minimize:
This will indeed package core and api, but the third-party libraries that core and api depend on are still not packaged
Shadow Version
7.0.0
Gradle Version
7.1
Expected Behavior
Properly minimize dependencies
Actual Behavior
It also minimized my project code?!
Gradle Build Script(s)
I created a example project to reproduce it:
https://github.com/re-ovo/shadow-jar-test
This is the root project build script:
https://github.com/re-ovo/shadow-jar-test/blob/master/build.gradle
The text was updated successfully, but these errors were encountered: