polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [50/50] [abbrv] zest-qi4j git commit: build: reactivate jacoco using the latest version
Date Fri, 17 Apr 2015 16:09:02 GMT
build: reactivate jacoco using the latest version

This version works with Java 8.
Another commit on the ‘develop’ branch (3ed4896) upgraded jacoco to the
very same version.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/e62f94a3
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/e62f94a3
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/e62f94a3

Branch: refs/heads/3.0
Commit: e62f94a34f52742c1ef6695590ad7cfe23f4bc0d
Parents: aa86f99
Author: Paul Merlin <paul@nosphere.org>
Authored: Sat Jan 24 15:04:03 2015 +0100
Committer: Paul Merlin <paul@nosphere.org>
Committed: Sat Jan 24 15:04:03 2015 +0100

----------------------------------------------------------------------
 build.gradle | 113 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 58 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/e62f94a3/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2c0db13..20f215e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -175,7 +175,7 @@ allprojects {
   if( ext.javaDir.isDirectory() || ext.scalaDir.isDirectory() ||
       ext.testJavaDir.isDirectory() || ext.testScalaDir.isDirectory() )
   {
-//    apply plugin: 'jacoco'
+    apply plugin: 'jacoco'
     apply plugin: 'osgi'
     apply plugin: VersionClass
     apply plugin: AsciidocBuildInfo
@@ -250,7 +250,7 @@ allprojects {
       systemProperties = testProperties
       systemProperties['user.dir'] = workingDir // GRADLE-2859
       ignoreFailures = true
-      testReport = true
+      reports.html.enabled(true)
       afterSuite { descriptor, result ->
         if( result.resultType == TestResult.ResultType.FAILURE )
         {
@@ -258,6 +258,9 @@ allprojects {
         }
       }
     }
+    jacoco {
+      toolVersion = '0.7.2.201409121644'
+    }
 
 //    // Create checkstyle report
 //    task checkstyleReport( type: Xslt, dependsOn: check ) {
@@ -340,63 +343,63 @@ test {
 
 // Jacoco
 configurations {
-//  jacoco
+  jacoco
 }
 dependencies {
-//  jacoco 'org.jacoco:org.jacoco.ant:0.7.1.201405082137'
+  jacoco 'org.jacoco:org.jacoco.ant:0.7.2.201409121644'
 }
 // Generate a global code codeverage report
-//task coverageReport {
-//  dependsOn subprojects*.test
-//  def outputPath = "build/reports/coverage"
-//  def coveredProjects = subprojects.findAll { p -> new File( "${p.buildDir.path}/jacoco"
).exists() }
-//  def coreProjects = coveredProjects.findAll { p -> p.name.startsWith('org.qi4j.core'
) }
-//  def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.lib'
) }
-//  def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.ext'
) }
-//  def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tool'
) }
-//  def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tuto'
) }
-//  def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.sample'
) }
-//  ant {
-//    taskdef name:'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacoco.asPath
-//    mkdir dir: outputPath
-//    jacocoreport {
-//      executiondata {
-//        coveredProjects.collect { p -> fileset( dir: "${p.buildDir.path}/jacoco" ) {
include( name: '*.exec' ) } }
-//      }
-//      structure( name: "Qi4j SDK" ) {
-//        group( name: "Core" ) {
-//          classfiles { coreProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { coreProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//        group( name: "Libraries" ) {
-//          classfiles { libProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { libProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//        group( name: "Extensions" ) {
-//          classfiles { extProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { extProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//        group( name: "Tools" ) {
-//          classfiles { toolsProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { toolsProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//        group( name: "Tutorials" ) {
-//          classfiles { tutoProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { tutoProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//        group( name: "Samples" ) {
-//          classfiles { samplesProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
-//          sourcefiles { samplesProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
-//        }
-//      }
-//      csv  destfile: "${outputPath}/jacoco.csv", encoding: "UTF-8"
-//      xml  destfile: "${outputPath}/jacoco.xml", encoding: "UTF-8"
-//      html destdir:  outputPath, encoding: "UTF-8", locale: "en", footer: "Qi4j SDK"
-//    }
-//  }
-//  inputs.dir coveredProjects.collect { p -> "${p.buildDir.path}/jacoco" }
-//  outputs.dir outputPath
-//}
+task coverageReport {
+  dependsOn subprojects*.test
+  def outputPath = "build/reports/coverage"
+  def coveredProjects = subprojects.findAll { p -> new File( "${p.buildDir.path}/jacoco"
).exists() }
+  def coreProjects = coveredProjects.findAll { p -> p.name.startsWith('org.qi4j.core'
) }
+  def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.lib' )
}
+  def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.ext' )
}
+  def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tool'
) }
+  def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.tuto'
) }
+  def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.qi4j.sample'
) }
+  ant {
+    taskdef name:'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: configurations.jacoco.asPath
+    mkdir dir: outputPath
+    jacocoreport {
+      executiondata {
+        coveredProjects.collect { p -> fileset( dir: "${p.buildDir.path}/jacoco" ) { include(
name: '*.exec' ) } }
+      }
+      structure( name: "Qi4j SDK" ) {
+        group( name: "Core" ) {
+          classfiles { coreProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { coreProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+        group( name: "Libraries" ) {
+          classfiles { libProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { libProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+        group( name: "Extensions" ) {
+          classfiles { extProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { extProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+        group( name: "Tools" ) {
+          classfiles { toolsProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { toolsProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+        group( name: "Tutorials" ) {
+          classfiles { tutoProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { tutoProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+        group( name: "Samples" ) {
+          classfiles { samplesProjects.collect { p -> fileset dir: "${p.buildDir.path}/classes/main"
} }
+          sourcefiles { samplesProjects.collect { p -> fileset dir: "${p.projectDir.path}/src/main/java"
} }
+        }
+      }
+      csv  destfile: "${outputPath}/jacoco.csv", encoding: "UTF-8"
+      xml  destfile: "${outputPath}/jacoco.xml", encoding: "UTF-8"
+      html destdir:  outputPath, encoding: "UTF-8", locale: "en", footer: "Qi4j SDK"
+    }
+  }
+  inputs.dir subprojects.collect { p -> "${p.buildDir.path}/jacoco" }
+  outputs.dir outputPath
+}
 
 
 // Build the whole SDK public Javadoc


Mime
View raw message