aboutsummaryrefslogtreecommitdiff
path: root/src/main/groovy/frege/gradle/tasks/FregeCompile.groovy
diff options
context:
space:
mode:
authorRene Groeschke <rene@gradle.com>2015-11-23 23:37:22 +0000
committerRene Groeschke <rene@gradle.com>2015-11-23 23:37:22 +0000
commitdd954e14c06f7568a6009b303a50c50a4e2216cf (patch)
tree7e23c35076e678f4634767934782b5e1e9625e62 /src/main/groovy/frege/gradle/tasks/FregeCompile.groovy
parente2259af79dab2a3e132a7d049d180c47ee8a43b8 (diff)
downloadfrege-gradle-plugin-dd954e14c06f7568a6009b303a50c50a4e2216cf.tar.gz
frege-gradle-plugin-dd954e14c06f7568a6009b303a50c50a4e2216cf.tar.bz2
frege-gradle-plugin-dd954e14c06f7568a6009b303a50c50a4e2216cf.zip
fix FregeCompile incremental build behaviour
Diffstat (limited to 'src/main/groovy/frege/gradle/tasks/FregeCompile.groovy')
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeCompile.groovy11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main/groovy/frege/gradle/tasks/FregeCompile.groovy b/src/main/groovy/frege/gradle/tasks/FregeCompile.groovy
index 290f750..1b32351 100644
--- a/src/main/groovy/frege/gradle/tasks/FregeCompile.groovy
+++ b/src/main/groovy/frege/gradle/tasks/FregeCompile.groovy
@@ -62,7 +62,6 @@ class FregeCompile extends AbstractCompile {
@Input
String mainClass = "frege.compiler.Main"
- @Optional
@Input
List<String> allJvmArgs = []
@@ -77,24 +76,18 @@ class FregeCompile extends AbstractCompile {
@Override
@TaskAction
protected void compile() {
- def jvmArgs = allJvmArgs
- if (jvmArgs.isEmpty()) {
- jvmArgs << "-Xss$stackSize".toString()
- }
+ def jvmArgumentsToUse = allJvmArgs.empty ? ["-Xss$stackSize"] : new ArrayList<String>(allJvmArgs)
def compilerArgs = allArgs ? allArgs.split().toList() : assembleArguments()
logger.info("Calling Frege compiler with compilerArgs: '$compilerArgs'")
-
//TODO integrate with gradle compiler daemon infrastructure and skip internal execution
-
- def errOutputStream = new ByteArrayOutputStream();
- def outOutputStream = new ByteArrayOutputStream();
project.javaexec(new Action<JavaExecSpec>() {
@Override
void execute(JavaExecSpec javaExecSpec) {
javaExecSpec.args = compilerArgs
javaExecSpec.classpath = FregeCompile.this.classpath
javaExecSpec.main = mainClass
+ javaExecSpec.jvmArgs = jvmArgumentsToUse
javaExecSpec.errorOutput = System.err;
javaExecSpec.standardOutput = System.out;
}