Skip to content

Instantly share code, notes, and snippets.

@zezutom
Created October 10, 2015 19:14
Show Gist options
  • Save zezutom/8526e229a4ab01d7a69f to your computer and use it in GitHub Desktop.
Save zezutom/8526e229a4ab01d7a69f to your computer and use it in GitHub Desktop.
An example of how to use the Cobertura plugin with Gradle
plugins {
id 'net.saliman.cobertura' version '2.2.7'
}
configurations.all {
resolutionStrategy {
// Cobertura includes an ASM version that can't handle Java 8, ASM 5.0.3 handles Java8
// Please note that doesn't resolve all of the issues, such as the lack of support for Lambda expressions
force 'org.ow2.asm:asm:5.0.3'
forcedModules = [ 'org.ow2.asm:asm:5.0.3' ]
}
}
apply plugin: 'java'
repositories {
jcenter()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.12'
testCompile 'junit:junit:4.12'
}
test.finalizedBy(project.tasks.cobertura)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment