Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jacoco gradle with subprojects. #10

Open
marcofranssen opened this issue Mar 26, 2019 · 0 comments
Open

Jacoco gradle with subprojects. #10

marcofranssen opened this issue Mar 26, 2019 · 0 comments

Comments

@marcofranssen
Copy link

Do you have any idea on how to merge the jacoco reports of a multi module gradle project?

plugins {
    id "org.sonarqube" version "2.7"
    id 'jacoco'
}

def allTestCoverageFile = "${buildDir}/jacoco/allTestCoverage.exec"

// This seems to be a jacoco task which can be used to merge reports.
task jacocoMerge(type: JacocoMerge, group: 'verification') {
    // ??????????????????????????????????????????
}

sonarqube {
    properties {
        property "sonar.scm.provider", "git"
        property "sonar.jacoco.reportPaths", allTestCoverageFile
    }
}

subprojects {
    apply plugin: 'java'
    apply plugin: 'jacoco'

    sonarqube {
        properties {
            property "sonar.jacoco.reportPaths", allTestCoverageFile
        }
    }
}

project(':projectA') {
    dependencies {
        compile project(':projectB')
        compile project(':projectC')
    }
}

project(':projectB') {
    dependencies {
        compile project(':projectC')
    }
}

project(':projectC') {
    dependencies {
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant