Skip to content

abirmingham/gradle-jacoco-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Provides a gradle interface for generating a jacoco report.

Use

buildscript {
    dependencies {
        classpath 'com.github.abirmingham:gradle-jacoco-plugin:1.3'
    }
}

apply plugin: 'jacoco'

Configure

jacoco {
    // note that no configuration is required
    tmpDir    = "${buildDir}/tmp/jacoco"
    reportDir = "${project.reporting.baseDir.absolutePath}/jacoco"
    excludes  = ["**/*Controller", "com/mycompany/util/MyUntestableClass"]
}

Profit

Assuming reportDir is unchanged:

open ./build/reports/jacoco/index.html

Notes

Ant is used to instrument the test task (org.jacoco.ant.AgentTask), and to generate the report (org.jacoco.ant.ReportTask). Heavily influenced by gschmidl/jacoco-gradle.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published