gwtdev.gradle 3.39 KiB
configurations.create('gwt')
if (System.getProperty("openbis.development-build") != null) {
configurations.gwt {
transitive = false
}
dependencies {
gwt 'reveregroup:gwt-image-loader:1.1.4',
'google:gwt-dev:2.4',
'google:gwt-user:2.4',
'google:gwt-debug-panel:1.0',
'sencha:gxt:2.2.5',
'sis:sis-base:23.06.0',
'fasterxml:jackson-annotations:2.9.10',
project(':lib-common'),
project(path: ':lib-common', configuration: 'archives'),
project(':lib-commonbase'),
project(path: ':lib-commonbase', configuration: 'archives'),
project(path: ':api-openbis-java'),
project(path: ':api-openbis-java', configuration: 'archives'),
project(path: ':lib-openbis-common'),
project(path: ':lib-openbis-common', configuration: 'archives'),
project(path: ':server-application-server'),
project(path: ':server-application-server', configuration: 'archives'),
project(path: ':server-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'
into 'targets/www/WEB-INF'
from(project.configurations.runtimeOnly.files) {
into '../lib'
exclude 'cisd-cifex*'
exclude 'lib-common-*'
exclude 'lib-commonbase-*'
exclude 'lib-authentication-*'
exclude 'lib-dbmigration-*'
exclude 'lib-openbis-common-*'
exclude 'api-openbis-java-*'
exclude 'server-application-server-*'
exclude 'server-original-data-store-*'
}
from('source/java/service.properties') {
into 'classes'
}
}
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(":server-application-server").sourceSets.main.java.srcDirs,
project(":server-application-server").sourceSets.main.output.resourcesDir,
project(":server-application-server").sourceSets.main.output.classesDirs,
project(":server-application-server").sourceSets.main.compileClasspath,
project(":lib-common").sourceSets.main.java.srcDirs,
project(":api-openbis-java").sourceSets.main.java.srcDirs,
project(":server-screening").sourceSets.main.java.srcDirs,
project(":server-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"
}