Return-Path: X-Original-To: apmail-zest-commits-archive@minotaur.apache.org Delivered-To: apmail-zest-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFE7218F95 for ; Wed, 10 Feb 2016 08:55:48 +0000 (UTC) Received: (qmail 1814 invoked by uid 500); 10 Feb 2016 08:55:48 -0000 Delivered-To: apmail-zest-commits-archive@zest.apache.org Received: (qmail 1769 invoked by uid 500); 10 Feb 2016 08:55:48 -0000 Mailing-List: contact commits-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list commits@zest.apache.org Received: (qmail 1753 invoked by uid 99); 10 Feb 2016 08:55:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2016 08:55:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A1E74E04A2; Wed, 10 Feb 2016 08:55:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: paulmerlin@apache.org To: commits@zest.apache.org Date: Wed, 10 Feb 2016 08:55:49 -0000 Message-Id: In-Reply-To: <51c77abc2d294500998cf7e987a48421@git.apache.org> References: <51c77abc2d294500998cf7e987a48421@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] zest-java git commit: Build: fix Jacoco based global coverageReport task Build: fix Jacoco based global coverageReport task Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/7837c0ae Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/7837c0ae Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/7837c0ae Branch: refs/heads/support/2.1 Commit: 7837c0ae6c114d4288b1b88ab13b4137b4e874e6 Parents: 573f0f1 Author: Paul Merlin (Apache) Authored: Sun Aug 2 12:54:57 2015 +0200 Committer: Paul Merlin Committed: Wed Feb 10 09:53:03 2016 +0100 ---------------------------------------------------------------------- build.gradle | 93 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-java/blob/7837c0ae/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index 0477e33..02eb6e4 100644 --- a/build.gradle +++ b/build.gradle @@ -372,7 +372,7 @@ allprojects { } } jacoco { - toolVersion = '0.7.2.201409121644' + toolVersion = '0.7.5.201505241946' } // // Create checkstyle report @@ -469,60 +469,63 @@ configurations { jacoco } dependencies { - jacoco 'org.jacoco:org.jacoco.ant:0.7.2.201409121644' + jacoco 'org.jacoco:org.jacoco.ant:0.7.5.201505241946' } // 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: "Apache Zest™ (Java Edition) 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" } } + inputs.dir subprojects.collect { p -> "${p.buildDir.path}/jacoco" } + outputs.dir outputPath + doLast { + def coveredProjects = subprojects.findAll { p -> new File( "${p.buildDir.path}/jacoco" ).exists() } + def coreProjects = coveredProjects.findAll { p -> p.name.startsWith('org.apache.zest.core' ) } + def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.zest.lib' ) } + def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.zest.ext' ) } + def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.zest.tool' ) } + def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.zest.tuto' ) } + def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.zest.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' ) } } } - 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" } } + structure( name: "Apache Zest™ (Java Edition) 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: "Apache Zest™ (Java Edition) SDK" } - 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: "Apache Zest™ (Java Edition) SDK" } } - inputs.dir subprojects.collect { p -> "${p.buildDir.path}/jacoco" } - outputs.dir outputPath } +check.dependsOn coverageReport // Build the whole SDK public Javadoc @@ -988,7 +991,7 @@ task checkReleaseSpec { def notReleasable = [:] releaseApprovedProjects*.configurations.runtime.allDependencies.findAll({ it instanceof ProjectDependency }).each { dep -> def depNotReleaseApproved = releaseApprovedProjects.findAll { rp -> - rp.group == dep.dependencyProject.group && rp.name == dep.dependencyProject.name + rp.group == dep.dependencyProject.group && rp.name == dep.dependencyProject.name }.isEmpty() if( depNotReleaseApproved ) {