-
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
Zip resources are exploded into output Jar #196
Comments
Correct. This would be the expected behavior. Shadow is only for merging applications dependencies. a Jar file in If you want a local dependency, then you should be adding the jar as a File Dependency per https://docs.gradle.org/current/userguide/dependency_management.html#sub:file_dependencies |
Zip file added in resources is not dependency, its resource file which gets used in the application. I do not have any local dependencies. |
Jar task does not skip these and includes on the jar file. |
Sorry, I originally misread your question. Is it getting exploded into its contents? |
Not really. I have a resource file in format of zip, take an example of postal code. This file present under The same doesn't happen with shadowJar. Please refer shadow-example for further details.
Here is the details:
|
Yeah, it's treating. The JAR as a dependency and exploding its contents. Your shadow jar has a US.txt file in the root of the jar. That's the contents from the US.zip file. |
Okay. what would be the workaround? |
The only workaround at the moment would be to include the zip file contents in your project instead of the zip file and referencing them that way. |
For workaround, just change the extension from .zip to .zipx and it works! Though, the code needs to modified to refer the file with extension .zipx and looks to be a simpler change.
|
hi, FYI, for the longest time i've been double-zipping my resources to stop shadow i'll try 1.4 at some point and report whether this has been fixed. thanks! |
@Lanchon this is fixed in shadow 1.2.4 |
oh, awful mind trickery converted my used version from 1.2.3 to 1.3, sorry! |
it doesn't seem to be fixed. when replacing 1.2.3 for 1.2.4 i expected a single "dexpatcher-annotation-nested" jar to be included in the shadow jar, but no change: the contents of that jar are included in the shadow instead. |
Correct because this issue is for zip files not jars. Embedding a jar file into the shadow jar is not supported. There isn't a way for shadow at the moment to determine your intent here because the dependencies are jars too. |
See the referenced #111 for what you are tying to do. |
If src.main.resources.mydir folder has sample.zip, then shadowJar skips these file while creating the FatJar.
The text was updated successfully, but these errors were encountered: