JAL-3541 tidying build.gradle, delete cloverInstrDir re-added
authorBen Soares <bsoares@dundee.ac.uk>
Thu, 19 Mar 2020 12:35:45 +0000 (12:35 +0000)
committerBen Soares <bsoares@dundee.ac.uk>
Thu, 19 Mar 2020 12:35:45 +0000 (12:35 +0000)
build.gradle

index 77cd9ab..fdca6a3 100644 (file)
@@ -405,8 +405,8 @@ sourceSets {
 
 // clover bits
 dependencies {
-  cloverCompile 'org.openclover:clover:4.4.1'
   if (use_clover) {
+    cloverCompile 'org.openclover:clover:4.4.1'
     testCompile 'org.openclover:clover:4.4.1'
   }
 }
@@ -558,7 +558,7 @@ task cloverInstr {
   outputs.dir cloverInstrDir
 
   doFirst {
-    //delete cloverInstrDir
+    delete cloverInstrDir
     def argsList = [
       "--initstring",
       cloverDb,
@@ -608,6 +608,26 @@ task cloverReport {
     com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
   }
 }
+
+
+compileCloverJava {
+
+  doFirst {
+    sourceCompatibility = compile_source_compatibility
+    targetCompatibility = compile_target_compatibility
+    options.compilerArgs += additional_compiler_args
+    print ("Setting target compatibility to "+targetCompatibility+"\n")
+  }
+  classpath += configurations.cloverRuntime
+}
+
+
+task cleanClover {
+  doFirst {
+    delete cloverInstrDir
+    delete cloverDb
+  }
+}
 // end clover bits
 
 
@@ -639,18 +659,6 @@ compileTestJava {
 }
 
 
-compileCloverJava {
-
-  doFirst {
-    sourceCompatibility = compile_source_compatibility
-    targetCompatibility = compile_target_compatibility
-    options.compilerArgs += additional_compiler_args
-    print ("Setting target compatibility to "+targetCompatibility+"\n")
-  }
-  classpath += configurations.cloverRuntime
-}
-
-
 clean {
   doFirst {
     delete sourceSets.main.java.outputDir
@@ -658,14 +666,6 @@ clean {
 }
 
 
-task cleanClover {
-  doFirst {
-    delete cloverInstrDir
-    delete cloverDb
-  }
-}
-
-
 cleanTest {
   dependsOn cleanClover
   doFirst {