From dd954e14c06f7568a6009b303a50c50a4e2216cf Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Mon, 23 Nov 2015 23:37:22 +0000 Subject: fix FregeCompile incremental build behaviour --- src/main/groovy/frege/gradle/tasks/FregeCompile.groovy | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/main/groovy/frege/gradle/tasks') 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 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(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() { @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; } -- cgit