Issue #95 - Updated ReporterResourcesTest
[jpf-core.git] / build.gradle
index 555abff2ca320a99b272cda8ad11ca98a027cd59..d105247dc45c3c9f873ae6c64755b118acf44523 100644 (file)
@@ -1,6 +1,8 @@
 plugins {
 plugins {
-    id "com.gradle.build-scan"
+    id "com.gradle.build-scan" version "1.14"
     id "java"
     id "java"
+    id "jacoco"
+    id "eclipse"
 }
 
 sourceCompatibility = 1.8
 }
 
 sourceCompatibility = 1.8
@@ -10,7 +12,7 @@ ext.manifestCommonAttrbutes = manifest {
     attributes(
         "Built-By": System.getProperty("user.name"),
         "Implementation-Vendor": "NASA Ames Research Center",
     attributes(
         "Built-By": System.getProperty("user.name"),
         "Implementation-Vendor": "NASA Ames Research Center",
-        "Implementation-Version": "1234" // FIXME
+        "Implementation-Version": "8.0"
     )
 }
 
     )
 }
 
@@ -19,6 +21,13 @@ buildScan {
     termsOfServiceAgree = 'yes'
 }
 
     termsOfServiceAgree = 'yes'
 }
 
+jacocoTestReport {
+    reports {
+        xml.enabled = true
+        html.enabled = false
+    }
+}
+
 repositories {
     mavenCentral()
 }
 repositories {
     mavenCentral()
 }
@@ -76,13 +85,9 @@ task generateBuildInfo {
     description = "Generates the build.properties file."
     doLast {
 
     description = "Generates the build.properties file."
     doLast {
 
-        // Must fail if there are uncommitted changes
-        def status  = "git status --short".execute().text.trim()
-        if (!status.isEmpty()) {
-            throw new GradleException("There are uncomitted changes:\n " + status)
-        }
         Properties info = new Properties()
 
         Properties info = new Properties()
 
+        def status  = "git status --short".execute().text.trim()
         def revision = "git rev-parse --short HEAD".execute().text.trim()
         def userName = ["git", "log", "-1", "--format=%an <%ae>"].execute().text.trim()
         def date = "git log -1 --format=%ci".execute().text.trim()
         def revision = "git rev-parse --short HEAD".execute().text.trim()
         def userName = ["git", "log", "-1", "--format=%an <%ae>"].execute().text.trim()
         def date = "git log -1 --format=%ci".execute().text.trim()
@@ -357,4 +362,22 @@ test {
     }
 }
 
     }
 }
 
+eclipse {
+    group = "JPF IDE Support"
+
+    project {
+        natures = ["org.eclipse.buildship.core.gradleprojectnature"]
+    }
+    classpath {
+        defaultOutputDir = buildDir
+        file {
+            whenMerged { classpath ->
+                classpath.entries.findAll{ entry -> entry.kind == "src" }*.every { srcNode ->
+                    srcNode.output = srcNode.output.replace("bin", "${buildDir.name}")
+                }
+            }
+        }
+    }
+}
+
 defaultTasks "buildJars"
 defaultTasks "buildJars"