Created
May 16, 2018 12:48
-
-
Save vegegoku/05ae3942442fa0ebeea2ae6d9698ca7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task compileGwt(dependsOn: classes, type: JavaExec) { | |
ext.buildDir = "${project.buildDir}/gwt" | |
ext.extraDir = "${project.buildDir}/extra" | |
inputs.file sourceSets.main.java.srcDirs | |
inputs.dir sourceSets.main.output.resourcesDir | |
outputs.dir buildDir | |
doFirst { | |
file(buildDir).mkdirs() | |
} | |
main = "com.google.gwt.dev.Compiler" | |
classpath { | |
[ | |
sourceSets.main.java.srcDirs, // Java source | |
sourceSets.main.output.resourcesDir, // Generated resources | |
sourceSets.main.output.classesDir, // Generated classes | |
sourceSets.main.compileClasspath, // Deps | |
] | |
} | |
if (project.hasProperty('dev')) { | |
println "Run developer mode" | |
args = [ | |
"com.test.portal.AppClientModule", | |
"-war", buildDir, | |
"-logLevel", "INFO", | |
"-localWorkers", "4", | |
"-compileReport", | |
"-extra", extraDir, | |
"-style", "OBF", | |
"-optimize", "9" // 0=none, 9=max | |
] | |
} else { | |
println "Run production mode" | |
args = [ | |
"com.test.portal.AppClientModule", | |
"-war", buildDir, | |
"-logLevel", "INFO", | |
"-localWorkers", "4", | |
"-compileReport", | |
"-extra", extraDir, | |
"-style", "OBF", | |
"-optimize", "9" // 0=none, 9=max | |
] | |
} | |
maxHeapSize = "4G" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment