apply plugin: 'java-library-distribution' distributions { main{ baseName = 'MOA-ASIC' } } configurations { jaxb } dependencies { jaxb group: 'com.sun.xml.bind', name: 'jaxb-xjc', version: '2.2.4-1' compile project(':common') compile project(':moa-sig-lib') compile 'org.slf4j:slf4j-log4j12:1.7.12' } sourceSets { main { java { srcDirs = ['src/main/java', 'src/generated/java'] } } } task jaxb () { // output directory def jaxbTargetDir = file( "${projectDir}/src/generated/java" ) //jaxbTargetDirMoaSig = file( jaxbTargetDir.path ) // perform actions doLast { jaxbTargetDir.mkdirs() ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.jaxb.asPath) //ant.jaxbTargetDirMoaSig = jaxbTargetDir // MOA Sig ant.xjc( destdir: jaxbTargetDir.path, package: 'at.gv.egiz.asic', schema: 'src/main/resources/schemas/asic.xsd' ) } } task releases(type: Copy) { from jar.outputs from distZip.outputs from distTar.outputs into rootDir.toString() + "/releases/" + version }