if (System.getProperty("openbis.development-build") != null) { configurations.create('gwtdev') configurations.gwtdev { transitive = false } dependencies { gwtdev 'reveregroup:gwt-image-loader:+', 'google:gwt-dev:+', 'google:gwt-user:+', 'google:gwt-debug-panel:+', 'sencha:gxt:+', 'sis:sis-base:+', 'fasterxml:jackson-annotations:+', project(':common'), project(path:':common', configuration: 'archives'), project(path:':authentication'), project(path:':authentication', configuration: 'archives'), project(path:':dbmigration'), project(path:':dbmigration', configuration: 'archives'), project(path:':cifex', configuration: 'archives'), project.configurations.archives } } task deleteGWT(type: Delete) { delete '.gwt-cache', 'targets/www' } task prepareGWT(type:Copy, dependsOn: [deleteGWT, compileJava]) { from 'resource/server' from files('../common/resource/server') { exclude 'gwt.xml' } into 'targets/www/WEB-INF' from (files('source/java')) { include '**/*.xml' include '**/*.properties' include 'ch/systemsx/cisd/cifex/public/**/*' into 'classes' } from (project.configurations.runtime.files) { into 'lib' exclude 'cisd-cifex*' } from (sourceSets.main.output) { into 'classes' } doLast { file("targets/www/WEB-INF/gwt.xml").createNewFile() } } task compileGWTToTemp(type: JavaExec, dependsOn: prepareGWT) { inputs.source sourceSets.main.java.srcDirs inputs.dir sourceSets.main.output.resourcesDir outputs.dir 'targets/www/gwt-temp' main = 'com.google.gwt.dev.Compiler' maxHeapSize = '1024m' classpath { configurations.getByName('gwtdev') } args = [ '-war', 'targets/www/gwt-temp', "ch.systemsx.cisd.cifex.CifexSafari", '-draftCompile', '-style', 'PRETTY', '-logLevel', 'INFO'] } task compileGWT(type: Copy, dependsOn: compileGWTToTemp) { from "targets/www/gwt-temp/ch.systemsx.cisd.cifex.Cifex" into "targets/www/cifex-test" }