Created
February 26, 2016 15:45
-
-
Save bmuschko/f29dc12e304daee5f978 to your computer and use it in GitHub Desktop.
JarJar for Gradle API
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
dependencies { | |
runtime project(':core') | |
runtime project(':dependencyManagement') | |
runtime project(':pluginUse') | |
runtime project(':toolingApi') | |
} | |
task jarJarJar(type: org.gradle.build.JarJarJar) { | |
ext.shadedPackage = 'org.gradle.jarjar' | |
from sourceSets.main.output | |
from { configurations.runtime.collect { zipTree(it) } } | |
exclude 'api-mapping.txt' | |
exclude 'default-imports.txt' | |
exclude 'META-INF/**' | |
exclude 'gradle-plugins.properties' | |
exclude 'fr/jayasoft/ivy/ant/**' | |
exclude 'net/rubygrapefruit/platform/**' | |
exclude 'com/sun/jna/**' | |
exclude 'org/fusesource/jansi/**' | |
exclude 'images/**' | |
exclude 'license/**' | |
exclude 'licenses/**' | |
exclude 'LICENSE.txt' | |
exclude 'mozilla/**' | |
exclude 'module.properties' | |
exclude '*.html' | |
rule('org.gradle.**', '@0') | |
rule('org.apache.tools.ant.**', '@0') | |
rule('groovy.**', '@0') | |
rule('org.slf4j.**', '@0') | |
rule('javax.inject.Inject', '@0') | |
rule('org.**', "${shadedPackage}.@0") | |
rule('com.**', "${shadedPackage}.@0") | |
rule('net.**', "${shadedPackage}.@0") | |
rule('jcifs.**', "${shadedPackage}.@0") | |
keep('org.gradle.**') | |
Date start | |
doFirst { | |
start = new Date() | |
} | |
doLast { | |
Date stop = new Date() | |
def td = groovy.time.TimeCategory.minus( stop, start ) | |
logger.quiet "Elapsed time to generate Gradle API jarJar: $td" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment