You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/03/22 05:09:33 UTC
[groovy] branch springcloud-jacoco updated (932c034 -> 8b1344b)
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a change to branch springcloud-jacoco
in repository https://gitbox.apache.org/repos/asf/groovy.git.
discard 932c034 Enable xml format of jacoco test report
new 8b1344b Enable xml format of jacoco test report
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (932c034)
\
N -- N -- N refs/heads/springcloud-jacoco (8b1344b)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
gradle/jacoco/jacoco.gradle | 50 +++++++++++++++++++++++++++++++--------------
1 file changed, 35 insertions(+), 15 deletions(-)
[groovy] 01/01: Enable xml format of jacoco test report
Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch springcloud-jacoco
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 8b1344bab63b009d52c535f4d4f0f04964cf55b1
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Mar 22 13:08:35 2020 +0800
Enable xml format of jacoco test report
---
.travis.yml | 58 ++++++++++++++++++++++-----------------------
gradle/jacoco/jacoco.gradle | 46 ++++++++++++++++++++++++++++-------
2 files changed, 67 insertions(+), 37 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 174d4cc..0773510 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,35 +25,35 @@ install:
matrix:
include:
- - env: BC='legacy'
- jdk: openjdk14
- - env: BC='legacy'
- jdk: openjdk13
- - env: BC='legacy'
- jdk: openjdk12
- - env: BC='legacy'
- jdk: openjdk11
- - env: BC='legacy'
- jdk: openjdk10
- - env: BC='legacy'
- jdk: oraclejdk9
- - env: BC='legacy'
- jdk: oraclejdk8
-
- - env: BC='indy'
- jdk: openjdk14
- - env: BC='indy'
- jdk: openjdk13
- - env: BC='indy'
- jdk: openjdk12
- - env: BC='indy'
- jdk: openjdk11
- - env: BC='indy'
- jdk: openjdk10
- - env: BC='indy'
- jdk: oraclejdk9
- - env: BC='indy'
- jdk: oraclejdk8
+# - env: BC='legacy'
+# jdk: openjdk14
+# - env: BC='legacy'
+# jdk: openjdk13
+# - env: BC='legacy'
+# jdk: openjdk12
+# - env: BC='legacy'
+# jdk: openjdk11
+# - env: BC='legacy'
+# jdk: openjdk10
+# - env: BC='legacy'
+# jdk: oraclejdk9
+# - env: BC='legacy'
+# jdk: oraclejdk8
+#
+# - env: BC='indy'
+# jdk: openjdk14
+# - env: BC='indy'
+# jdk: openjdk13
+# - env: BC='indy'
+# jdk: openjdk12
+# - env: BC='indy'
+# jdk: openjdk11
+# - env: BC='indy'
+# jdk: openjdk10
+# - env: BC='indy'
+# jdk: oraclejdk9
+# - env: BC='indy'
+# jdk: oraclejdk8
- env: BC='sonar'
jdk: openjdk11
diff --git a/gradle/jacoco/jacoco.gradle b/gradle/jacoco/jacoco.gradle
index da29316..ed9237d 100644
--- a/gradle/jacoco/jacoco.gradle
+++ b/gradle/jacoco/jacoco.gradle
@@ -26,14 +26,14 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
apply plugin: 'jacoco'
}
-// project.afterEvaluate {
+ project.afterEvaluate {
tasks.withType(JacocoReport) {
if (name != 'jacocoAllReport' && name != 'jacocoAllIndyReport') {
- sourceDirectories.from = sourceDirectories + files(project.sourceSets.main.allGroovy.srcDirs)
+ sourceDirectories.from = sourceDirectories.from + files(project.sourceSets.main.allGroovy.srcDirs)
// classDirectories += files(project.sourceSets.main.output)
}
}
-// }
+ }
}
// To avoid "Can't add different class with same name" fatal error
@@ -42,6 +42,7 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
task jacocoMerge(type: JacocoMerge) {
destinationFile = file("$buildDir/jacoco/jacoco-all.exec")
+
allprojects {
project.plugins.withType(JavaPlugin) {
project.tasks.withType(Test) { task ->
@@ -51,6 +52,8 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
}
}
}
+
+ executionData = files(executionData).filter { f -> f.exists() }
}
task jacocoMergeIndy(type: JacocoMerge) {
@@ -64,14 +67,25 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
}
}
}
+
+ executionData = files(executionData).filter { f -> f.exists() }
}
task jacocoAllReport(type: JacocoReport, dependsOn: 'jacocoMerge') {
executionData jacocoMerge.destinationFile
+ reports {
+ xml {
+ enabled true
+ }
+ html {
+ enabled true
+ }
+ }
+
allprojects {
project.plugins.withType(JavaPlugin) {
- def sd = sourceDirectories ?: files()
- def cd = classDirectories ?: files()
+ def sd = sourceDirectories.from ?: files()
+ def cd = classDirectories.from ?: files()
sourceDirectories.from = sd + files(project.sourceSets.main.allGroovy.srcDirs, project.sourceSets.main.allJava.srcDirs)
classDirectories.from = cd + files(compileGroovy.destinationDir)
}
@@ -80,10 +94,19 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
task jacocoAllIndyReport(type: JacocoReport, dependsOn: 'jacocoMergeIndy') {
executionData jacocoMergeIndy.destinationFile
+ reports {
+ xml {
+ enabled true
+ }
+ html {
+ enabled true
+ }
+ }
+
allprojects {
project.plugins.withType(JavaPlugin) {
- def sd = sourceDirectories ?: files()
- def cd = classDirectories ?: files()
+ def sd = sourceDirectories.from ?: files()
+ def cd = classDirectories.from ?: files()
sourceDirectories.from = sd + files(project.sourceSets.main.allGroovy.srcDirs, project.sourceSets.main.allJava.srcDirs)
classDirectories.from = cd + files(compileGroovyWithIndy.destinationDir)
}
@@ -91,5 +114,12 @@ if (rootProject.hasProperty('coverage') && Boolean.valueOf(rootProject.getProper
}
check.dependsOn jacocoAllReport
- check.dependsOn jacocoAllIndyReport
+ if (!rootProject.hasProperty('skipIndy')) {
+ check.dependsOn jacocoAllIndyReport
+ }
+
+ tasks.sonarqube.dependsOn jacocoAllReport
+ if (!rootProject.hasProperty('skipIndy')) {
+ tasks.sonarqube.dependsOn jacocoAllIndyReport
+ }
}