3 sourceCompatibility = 1.8
4 targetCompatibility = 1.8
11 testImplementation "junit:junit:4.12"
16 java.srcDirs = ["src/annotations"]
17 java.outputDir = file("${buildDir}/annotations")
20 java.srcDirs = ["src/main"]
21 java.outputDir = file("${buildDir}/main")
22 compileClasspath += sourceSets.annotations.output
25 java.srcDirs = ["src/examples"]
26 java.outputDir = file("${buildDir}/examples")
27 compileClasspath += sourceSets.main.output
30 java.srcDirs = ["src/classes"]
31 java.outputDir = file("${buildDir}/classes")
32 compileClasspath += sourceSets.main.output + sourceSets.annotations.output
35 java.srcDirs = ["src/peers"]
36 java.outputDir = file("${buildDir}/peers")
37 compileClasspath += sourceSets.main.output + sourceSets.annotations.output
40 java.srcDirs = ["src/tests"]
41 java.outputDir = file("${buildDir}/tests")
42 compileClasspath += sourceSets.annotations.output + sourceSets.classes.output + sourceSets.peers.output
47 enableAssertions = true
52 include "**/*Test.class"
53 exclude "**/SplitInputStreamTest.class"
54 exclude "**/JPF_*.class"
56 // XXX Tests temporarily ignored because they are not fully supported in the Gradle build yet
57 new File("failing-tests.txt").eachLine { failedTestClass ->
58 def ignoredPath = "**/" + failedTestClass.replace(".", "/") + ".class"
63 events "passed", "skipped", "failed"
66 afterSuite { testDescriptor, result ->
67 if (!testDescriptor.parent) {
68 println "Test Execution: ${result.resultType}"
70 def summaryFields = ["${result.testCount} tests",
71 "${result.successfulTestCount} passed",
72 "${result.failedTestCount} failed",
73 "${result.skippedTestCount} skipped"]
75 println "Summary: " + summaryFields.join(", ")
80 task compile(type: Copy) {
82 description = "Compile all JPF core sources"
84 // These are automatic generated tasks from the Java Gradle Plugin.
85 // Gradle is able to infer the ordering of the source source sets
86 // due to the compileClasspath attribute
87 dependsOn compileTestJava, compileExamplesJava
89 // Copies build.properties file to the build directory
90 from "build.properties"
91 into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
94 defaultTasks "compile"