configurations.create('gwt') if (System.getProperty("openbis.development-build") != null) { configurations.gwt { transitive = false } dependencies { gwt '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:':openbis_api'), project(path:':openbis_api', configuration: 'archives'), project(path:':openbis-common'), project(path:':openbis-common', configuration: 'archives'), project(path:':openbis'), project(path:':openbis', configuration: 'archives'), project(path:':screening', configuration: 'archives') } } task deleteGWT(type: Exec) { executable "rm" args "-rf", "${project.projectDir.absolutePath}/.gwt-cache", "${project.projectDir.absolutePath}/targets/www" } task prepareGWT(type:Copy, dependsOn: [deleteGWT, compileJava]) { from 'resource/server' from files('../common/resource/server') { exclude 'gwt.xml' } from file('../openbis/resource/server/bis-common.xml') into 'targets/www/WEB-INF' from (project.configurations.runtime.files) { into 'lib' exclude 'cisd-cifex*' exclude 'common-*' exclude 'authentication-*' exclude 'dbmigration-*' exclude 'openbis-common-*' exclude 'openbis_api-*' exclude 'openbis-*' exclude 'datastore_server-*' } from ('source/java/service.properties') { 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 { [ sourceSets.main.java.srcDirs, project(":openbis").sourceSets.main.java.srcDirs, project(":openbis").sourceSets.main.output.resourcesDir, project(":openbis").sourceSets.main.output.classesDir, project(":openbis").sourceSets.main.compileClasspath, project(":common").sourceSets.main.java.srcDirs, project(":openbis_api").sourceSets.main.java.srcDirs, project(":screening").sourceSets.main.java.srcDirs, project(":screening").sourceSets.main.output.resourcesDir, configurations.gwt ] } args = [ '-war', 'targets/www/gwt-temp', "ch.systemsx.cisd.openbis.plugin.screening.OpenBISSafari", '-draftCompile', '-style', 'PRETTY', '-logLevel', 'INFO'] } task compileGWT(type: Copy, dependsOn: compileGWTToTemp) { from "targets/www/gwt-temp/ch.systemsx.cisd.openbis.plugin.screening.OpenBIS" into "targets/www/openbis-test-screening" }