Skip to content

Instantly share code, notes, and snippets.

@paulwoods
Created August 12, 2011 14:06
Show Gist options
  • Save paulwoods/1142106 to your computer and use it in GitHub Desktop.
Save paulwoods/1142106 to your computer and use it in GitHub Desktop.
gradle - exclude files from a jar.
jar {
manifest {
attributes "Implementation-Title": "Gradle Quickstart"
attributes "Implementation-Version": version
attributes "Main-Class" : "com.ti.specteam.programs.Application"
}
// remove the security files (from mail.jar / activation.jar) so that the jar will be executable.
doFirst {
from (configurations.runtime.resolve().collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment