Last active
August 29, 2015 14:15
-
-
Save melix/1890d9e3e178b1d118e5 to your computer and use it in GitHub Desktop.
Délourdage en Gradle
This file contains hidden or 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
apply plugin:'java' | |
repositories { | |
jcenter() | |
} | |
configurations { | |
manu // une conf qui servira à récupérer la dep sans polluer le classpath de compilation | |
} | |
dependencies { | |
// le scope "manu" dépend de ce jar | |
manu('org.apache.directory.server:apacheds-all:2.0.0-M19') { transitive = false } | |
} | |
// Tâche pour défatter le gros lourdo | |
task unfatJar(type:Jar) { | |
baseName='apacheds-all-unfat' | |
from zipTree(configurations.manu.files[0]) | |
exclude 'org/slf4j/**' | |
} | |
dependencies { | |
// le scope compile va dépendre d'un jar qu'on va défatter | |
compile files(unfatJar.archivePath) | |
} | |
compileJava.dependsOn(unfatJar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment