vtm/vtm-web-js/build.gradle
2016-12-14 15:33:26 +02:00

92 lines
2.4 KiB
Groovy

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
}
}
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'gwt'
sourceSets {
main.java.srcDirs = ['src']
}
dependencies {
providedCompile project(':vtm-web')
providedCompile project(':vtm-extras')
providedCompile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
providedCompile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
providedCompile 'org.slf4j:slf4j-api:1.7.21'
providedCompile 'org.timepedia.exporter:gwtexporter:2.5.1'
providedCompile 'ru.finam:slf4j-gwt:1.7.7.1'
}
// explicit dependencies for org.gradle.configureondemand=true
evaluationDependsOn(':vtm')
evaluationDependsOn(':vtm-themes')
evaluationDependsOn(':vtm-gdx')
evaluationDependsOn(':vtm-web')
gwt {
gwtVersion = project.ext.gwtVersion
modules 'org.oscim.web.VtmWebJs'
superDev {
noPrecompile = true
}
compiler {
enableClosureCompiler = false; // activates -XenableClosureCompiler
disableClassMetadata = true; // activates -XdisableClassMetadata
disableCastChecking = true; // activates -XdisableCastChecking
}
src += files(sourceSets.main.java.srcDirs)
src += files(project(':vtm').sourceSets.main.allJava.srcDirs)
src += files(project(':vtm-themes').sourceSets.main.allJava.srcDirs)
src += files(project(':vtm-themes').sourceSets.main.resources.srcDirs)
src += files(project(':vtm-gdx').sourceSets.main.allJava.srcDirs)
src += files(project(':vtm-web').sourceSets.main.allJava.srcDirs)
}
// Run jetty with draft compiled war
task jettyDraftWar(type: JettyRunWar) {
dependsOn draftWar
//dependsOn.remove('war')
webApp = draftWar.archivePath
}
task copyThemeAssets(type: Copy) {
from "$rootDir/vtm-themes/resources/assets"
into "assets"
include '**/*'
}
task copyVtmAssets(type: Copy) {
from "$rootDir/vtm/resources/assets"
into "assets"
include '**/*'
}
task copyWarSources(type: Copy) {
from 'war/index.html'
from 'war/default.css'
from 'war/map.js'
into "src/main/webapp"
//include '**/*'
}
tasks.withType(JavaCompile) { compileTask ->
compileTask.dependsOn copyThemeAssets
compileTask.dependsOn copyVtmAssets
compileTask.dependsOn copyWarSources
}
clean {
delete "assets"
}