Mindustry/html/build.gradle

65 lines
1.6 KiB
Groovy

apply plugin: "java"
gwt {
gwtVersion='2.8.0' // Should match the gwt version used for building the gwt backend
maxHeapSize="2G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY
minHeapSize="1G"
src = files(file("src/")) // Needs to be in front of "modules" below.
modules 'io.anuke.mindustry.GdxDefinition'
devModules 'io.anuke.mindustry.GdxDefinitionSuperdev'
project.webAppDirName = 'webapp'
compiler {
strict = true
disableCastChecking = true
}
}
task dist(dependsOn: [clean, compileGwt]) {
doLast {
file("build/dist").mkdirs()
copy {
from "build/gwt/out"
into "build/dist"
}
copy {
from "webapp"
into "build/dist"
}
copy {
from "war"
into "build/dist"
}
}
}
task distZip(type: Zip, dependsOn: dist){
from "build/dist"
archiveName appName + "-html5.zip"
destinationDir(file("build/dist-zipped"))
}
draftWar {
from "war"
}
task addSource{
doLast{
sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs)
//this WILL fail if uCore is not a module
sourceSets.main.compileClasspath += files(project(':uCore').sourceSets.main.allJava.srcDirs)
}
}
tasks.compileGwt.dependsOn(addSource)
tasks.draftCompileGwt.dependsOn(addSource)
sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project {
name = appName + "-html"
}