mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-07 05:50:54 +07:00
73 lines
1.6 KiB
Groovy
73 lines
1.6 KiB
Groovy
apply plugin: "java"
|
|
apply plugin: "jetty"
|
|
//apply plugin: 'org.akhikhl.gretty'
|
|
|
|
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;
|
|
//enableClosureCompiler = 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"))
|
|
}
|
|
|
|
|
|
eclipseWtpFacet.doLast{
|
|
delete{
|
|
delete '.settings/org.eclipse.wst.common.project.facet.core.xml'
|
|
}
|
|
}
|
|
|
|
draftWar {
|
|
from "war"
|
|
}
|
|
|
|
task addSource{
|
|
doLast{
|
|
sourceSets.main.compileClasspath += files(project(':core').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"
|
|
}
|