Copying build.properties to output dir (fixes #64)
[jpf-core.git] / build.gradle
index a213a1d..8119f85 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"