Revision: 9645
http://sourceforge.net/p/gridarta/code/9645
Author: akirschbaum
Date: 2014-02-23 13:02:34 +0000 (Sun, 23 Feb 2014)
Log Message:
-----------
Simplify build script.
Modified Paths:
--------------
trunk/test-mapvalidator/build.gradle
Modified: trunk/test-mapvalidator/build.gradle
===================================================================
--- trunk/test-mapvalidator/build.gradle 2014-02-23 12:56:15 UTC (rev 9644)
+++ trunk/test-mapvalidator/build.gradle 2014-02-23 13:02:34 UTC (rev 9645)
@@ -6,21 +6,6 @@
description = 'Runs all map-validator tests.'
}
-public static String loadFile(File file) {
- ByteArrayOutputStream data = new ByteArrayOutputStream()
- new FileInputStream(file).withStream { FileInputStream is ->
- byte[] tmp = new byte[1024]
- while (true) {
- int len = is.read(tmp)
- if (len <= 0) {
- break
- }
- data.write(tmp, 0, len)
- }
- }
- return new String(data.toByteArray())
-}
-
tasks.addRule("Pattern: check_<type>") { String taskName ->
if (taskName.startsWith("check_")) {
String type = taskName - 'check_'
@@ -46,7 +31,7 @@
standardOutput = new FileOutputStream(outputFile)
}
} catch (ExecException ex) {
- println loadFile(outputFile)
+ println outputFile.text
throw ex;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|