Mindustry/html/build.gradle

66 lines
1.6 KiB
Groovy
Raw Normal View History

2017-04-30 08:25:59 +07:00
apply plugin: "java"
gwt {
gwtVersion='2.8.0' // Should match the gwt version used for building the gwt backend
2017-07-06 00:22:39 +07:00
maxHeapSize="2G" // Default 256m is not enough for gwt compiler. GWT is HUNGRY
2017-04-30 08:25:59 +07:00
minHeapSize="1G"
src = files(file("src/")) // Needs to be in front of "modules" below.
2017-05-03 11:09:48 +07:00
modules 'io.anuke.mindustry.GdxDefinition'
devModules 'io.anuke.mindustry.GdxDefinitionSuperdev'
2017-04-30 08:25:59 +07:00
project.webAppDirName = 'webapp'
compiler {
strict = true
disableCastChecking = true
2018-08-08 06:36:56 +07:00
//style = de.richsource.gradle.plugins.gwt.Style.DETAILED
2017-04-30 08:25:59 +07:00
}
}
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"))
}
2017-04-30 08:25:59 +07:00
draftWar {
from "war"
}
task addSource{
doLast{
sourceSets.main.compileClasspath += files(project(':core').sourceSets.main.allJava.srcDirs)
2017-12-23 06:10:34 +07:00
//this WILL fail if uCore is not a module
sourceSets.main.compileClasspath += files(project(':uCore').sourceSets.main.allJava.srcDirs)
}
2017-04-30 08:25:59 +07:00
}
tasks.compileGwt.dependsOn(addSource)
tasks.draftCompileGwt.dependsOn(addSource)
sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project {
name = appName + "-html"
}