Newer
Older
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',
'fasterxml:jackson-annotations:2.9.10',
Adam Laskowski
committed
project(':lib-common'),
project(path: ':lib-common', configuration: 'archives'),
project(path: ':api-openbis-java'),
project(path: ':api-openbis-java', configuration: 'archives'),
project(path: ':api-openbis-javascript'),
project(path: ':lib-openbis-common'),
project(path: ':lib-openbis-common', configuration: 'archives'),
project(path: ':server-application-server', configuration: 'archives')
}
}
Adam Laskowski
committed
def gwtTempPath = "${project.projectDir.absolutePath}/targets/www/gwt-temp"
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*'
Adam Laskowski
committed
exclude 'lib-common-*'
exclude 'lib-authentication-*'
exclude 'lib-dbmigration-*'
exclude 'lib-openbis-common-*'
exclude 'api-openbis-java-*'
}
from('source/java/service.properties') {
into 'classes'
}
}
task compileGWTToTempJDK8(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,
Adam Laskowski
committed
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,
configurations.gwt
]
}
args = ['-war',
'targets/www/gwt-temp',
"ch.systemsx.cisd.openbis.OpenBISSafari",
'-draftCompile',
'-style', 'PRETTY',
'-logLevel', 'INFO']
}
task compileGWT(type: Copy, dependsOn: compileGWTToTempJDK8) {
from "targets/www/gwt-temp/ch.systemsx.cisd.openbis.OpenBIS"
into "targets/www/openbis-test"
}
task untarGwt(type: Copy, dependsOn: prepareGWT) {
from tarTree(resources.gzip("../core-plugin-openbis/resource/gwt.tar.gz"))
Adam Laskowski
committed
into "${gwtTempPath}"
}
task compileGWTToTempJDK11(type: Copy, dependsOn: untarGwt) {
from "${project.projectDir.absolutePath}/source/java/ch/systemsx/cisd/openbis/public"
Adam Laskowski
committed
into "${gwtTempPath}/ch.systemsx.cisd.openbis.OpenBIS"
Adam Laskowski
committed
task copyV3Api(type: Copy, dependsOn: [compileGWTToTempJDK11, ':api-openbis-javascript:bundleOpenbisStaticResources']) {
from("${project(':api-openbis-javascript').projectDir}/src/v3")
into "${gwtTempPath}/ch.systemsx.cisd.openbis.OpenBIS/resources/api/v3"
}
task openBISDevelopmentEnvironmentASPrepare(type: Copy, dependsOn: copyV3Api) {
Adam Laskowski
committed
from "${gwtTempPath}/ch.systemsx.cisd.openbis.OpenBIS"
into "targets/www/openbis-test"
}