Created
October 10, 2015 19:14
-
-
Save zezutom/8526e229a4ab01d7a69f to your computer and use it in GitHub Desktop.
An example of how to use the Cobertura plugin with Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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