diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-07-19 01:31:34 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-07-19 01:31:34 +0200 |
commit | 19dc49153d7942912d2d16664e0118751b560d66 (patch) | |
tree | 899aba3a3b0bda5df848561625e6aecd05318243 /OpenKeychain-Test | |
parent | 6d9eaaabb211d538866edfa362c7a4abea05a962 (diff) | |
download | open-keychain-19dc49153d7942912d2d16664e0118751b560d66.tar.gz open-keychain-19dc49153d7942912d2d16664e0118751b560d66.tar.bz2 open-keychain-19dc49153d7942912d2d16664e0118751b560d66.zip |
use jacoco for test coverage
Diffstat (limited to 'OpenKeychain-Test')
-rw-r--r-- | OpenKeychain-Test/build.gradle | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenKeychain-Test/build.gradle b/OpenKeychain-Test/build.gradle index d795ace3d..a00268c59 100644 --- a/OpenKeychain-Test/build.gradle +++ b/OpenKeychain-Test/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'java' apply plugin: 'android-test' +apply plugin: 'jacoco' dependencies { testCompile 'junit:junit:4.11' @@ -31,6 +32,29 @@ android { projectUnderTest ':OpenKeychain' } +jacoco { + toolVersion = "0.7.0.201403182114" +} + +coverageSourceDirs = [ + '../OpenKeychain/src/main/java', + '../OpenKeychain/src/gen', + '../OpenKeychain/build/source/apt/debug', + '../OpenKeychain/build/source/generated/buildConfig/debug', + '../OpenKeychain/build/source/generated/r/debug' + ] + +jacocoTestReport { + reports { + xml.enabled = true + html.destination "${buildDir}/jacocoHtml" + } + // class R is used, but usage will not be covered, so ignore this class from report + classDirectories = fileTree(dir: '../OpenKeychain/build/intermediates/classes/debug/org/sufficientlysecure/keychain', exclude: 'R*.class') + additionalSourceDirs = files(coverageSourceDirs) + executionData = files('build/jacoco/testDebug.exec') +} + // new workaround to force add custom output dirs for android studio task addTest { def file = file(project.name + ".iml") |