evaluationDependsOn(':commonbase') evaluationDependsOn(':common') apply from: '../gradle/javaproject.gradle' configurations.create('libJars') dependencies { compile project(':common') libJars 'sis:sis-base:14.12.0', 'cisd:cisd-args4j:9.11.2', 'apache:log4j:1.2.15', 'javax:activation:1.1.1', 'javax:mail:1.4.3' testCompile project(path: ':common', configuration: 'tests') } jar { from('targets/dist') { include 'BUILD*INFO' } from (project(':commonbase').compileJava.outputs.getFiles().getAsFileTree().plus( project(':common').compileJava.outputs.getFiles().getAsFileTree()).matching { include 'ch/systemsx/cisd/common/**/*.class' }) manifest { attributes("Main-Class": "ch.systemsx.cisd.datamover.Main", "Class-Path": "log4j.jar sis-base.jar cisd-args4j.jar commons-lang.jar commons-io.jar activation.jar mail.jar", "Version": project.versionNumber, "Build-Number": "${project.versionNumber} (r${project.revisionNumber},${project.cleanFlag})") } } task dist(type: Zip, dependsOn: jar) { from 'dist' into 'datamover' from (jar.outputs.getFiles()) { into 'lib' } from (configurations.libJars.files) { into 'lib' } rename 'log4j.*', 'log4j.jar' rename 'sis-base.*', 'sis-base.jar' rename 'cisd-args4j.*', 'cisd-args4j.jar' rename 'datamover.*jar', 'datamover.jar' rename 'commons-lang.*', 'commons-lang.jar' rename 'commons-io.*', 'commons-io.jar' rename 'activation.*', 'activation.jar' rename 'mail.*', 'mail.jar' } build.dependsOn test build.dependsOn dist