evaluationDependsOn(':common') apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' dependencies { compile project(':common'), 'imagej:ij:+', 'sun:jai:+', 'bioformats:bioformats:+', 'slf4j:slf4j:+', 'slf4j:slf4j-log4j12:+' testCompile project(path: ':common', configuration: 'tests') } def jarConfiguration(parameters){ return { baseName = parameters.get('baseName') libraryName = parameters.get('libraryName') from('targets/dist') { include 'BUILD*INFO' } from(project.compileJava.outputs.getFiles().getAsFileTree().matching { include '**/imagereaders/*.class' include "**/imagereaders/${libraryName}/*.class" }) from("resource/manifest/${libraryName}") manifest { attributes("Version": project.versionNumber, "Build-Number": "${project.versionNumber} (r${project.revisionNumber},${project.cleanFlag})") } } } task jarImageIO(type: Jar) { configure jarConfiguration([ baseName : 'cisd-image_readers', libraryName : 'imageio' ]) } task jarJai(type: Jar) { configure jarConfiguration([ baseName : 'cisd-image_readers-jai', libraryName : 'jai' ]) } task jarBioformats(type: Jar) { configure jarConfiguration([ baseName : 'cisd-image_readers-bioformats', libraryName : 'bioformats' ]) } task jarImageJ(type: Jar) { configure jarConfiguration([ baseName : 'cisd-image_readers-imagej', libraryName : 'ij' ]) } jar.dependsOn([ jarImageIO, jarJai, jarBioformats, jarImageJ ])