Fix jacoco

This commit is contained in:
Dominik Schürmann 2014-12-04 19:58:08 +01:00
parent 6b9749289f
commit 9df7147c8b

View File

@ -47,30 +47,29 @@ android {
projectUnderTest ':OpenKeychain'
}
//jacoco {
// //toolVersion = "0.7.0.201403182114"
// toolVersion = "0.7.2.201409121644"
//}
//
//
//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'
// ]
jacoco {
toolVersion = "0.7.2.201409121644"
}
//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')
//}
def 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 {