Is there any way to leave out certain paths from a Gradle fat jar.
I am using:
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
from
http://docs.codehaus.org/display/GRADLE/Cookbook
and would like to leave out META-INF directories if possible.
Thank you! Misha
I haven't extensively tested it, but this should do what you're asking for:
jar {
from configurations.compile.collect {
it.isDirectory() ? it : zipTree(it).matching{exclude{it.name == 'META-INF'}}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With