Created
August 12, 2011 14:06
-
-
Save paulwoods/1142106 to your computer and use it in GitHub Desktop.
gradle - exclude files from a jar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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