Copying build.properties to output dir (fixes #64)
[jpf-core.git] / build.gradle
index a213a1d2eb2b5462ba72f3f6090a07f4c936885e..8119f8573b9a7f9ec0e2d0bda81c3604ba28e4d0 100644 (file)
@@ -58,9 +58,26 @@ test {
         def ignoredPath = "**/" + failedTestClass.replace(".", "/") + ".class"
         exclude ignoredPath
     }
+
+    testLogging {
+        events "passed", "skipped", "failed"
+    }
+
+    afterSuite { testDescriptor, result ->
+        if (!testDescriptor.parent) {
+            println "Test Execution: ${result.resultType}"
+
+            def summaryFields = ["${result.testCount} tests",
+                                 "${result.successfulTestCount} passed",
+                                 "${result.failedTestCount} failed",
+                                 "${result.skippedTestCount} skipped"]
+
+            println "Summary: " + summaryFields.join(", ")
+        }
+    }
 }
 
-task compile {
+task compile(type: Copy) {
     group = "JPF Build"
     description = "Compile all JPF core sources"
 
@@ -68,6 +85,10 @@ task compile {
     // Gradle is able to infer the ordering of the source source sets
     // due to the compileClasspath attribute
     dependsOn compileTestJava, compileExamplesJava
+
+    // Copies build.properties file to the build directory
+    from "build.properties"
+    into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
 }
 
 defaultTasks "compile"