diff --git a/build.gradle b/build.gradle index 859a9230..d1ff04fa 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ class Tags { List jVMArgs = [] String exec = null String runFirst = null + String outputLine = null private List lines private String block def Tags(List lines) { @@ -39,6 +40,12 @@ class Tags { jVMArgs = jvmArgString.split(' ') exec = extract('Exec:') runFirst = extract('RunFirst:') + lines.each { + if(it =~ /\\/* Output:/) { + outputLine = it.trim() + println outputLine + } + } } private def testFor(String marker) { return block.contains("// {" + marker + "}") @@ -137,6 +144,8 @@ subprojects { String basePath = it.absolutePath.replaceAll('\\.java', '') File outFile = new File(basePath + '.out') + if(tags.outputLine) + outFile.write(tags.outputLine + "\n") File errFile = new File(basePath + '.err') OutputStream runStandardOutput = new TeeOutputStream(new FileOutputStream(outFile), System.out) OutputStream runErrorOutput = new TeeOutputStream(new FileOutputStream(errFile), System.err)