apply from: '../gradle/javaproject.gradle' dependencies { compile 'cisd:cisd-base:+', 'rinn:restrictions:+' testCompile 'testng:testng:+' } task javadocZip(type: Zip, dependsOn: javadoc) { archiveName "${project.group}-args4j-javadoc.zip" from javadoc.destinationDir } task distributionZip(type: Zip, dependsOn: [jar, sourcesJar, javadocZip]) { baseName = "$project.group-args4j" from ('dist') { into "${project.group}-args4j" } from (javadocZip.archivePath) { into "${project.group}-args4j/doc" } from (jar.archivePath) { into "${project.group}-args4j/lib" rename '(.*)', "${project.group}-args4j.jar" } from (sourcesJar.archivePath) { into "${project.group}-args4j/src" rename '(.*)', "${project.group}-args4j-src.zip" } } build.dependsOn distributionZip publishing { publications { ivy(IvyPublication) { module "${project.group}-args4j" revision project.revisionForPublication from components.java artifact(sourcesJar) { type = 'source' } descriptor { withXml { asNode().dependencies.dependency.find { it.@org == 'rinn' }.replaceNode {} } } } } }