aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain/build.gradle')
-rw-r--r--OpenKeychain/build.gradle18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle
index 7fae773f0..e2d1dd8c8 100644
--- a/OpenKeychain/build.gradle
+++ b/OpenKeychain/build.gradle
@@ -44,7 +44,7 @@ dependencies {
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'org.commonjava.googlecode.markdown4j:markdown4j:2.2-cj-1.0'
- compile "com.splitwise:tokenautocomplete:1.3.3@aar"
+ compile 'com.splitwise:tokenautocomplete:1.3.3@aar'
compile 'se.emilsjolander:stickylistheaders:2.6.0'
compile 'org.sufficientlysecure:html-textview:1.1'
compile 'com.mikepenz.materialdrawer:library:2.8.2@aar'
@@ -114,7 +114,13 @@ android {
versionCode 32300
versionName "3.2.3"
applicationId "org.sufficientlysecure.keychain"
+ // the androidjunitrunner is broken regarding coverage, see here:
+ // https://code.google.com/p/android/issues/detail?id=170607
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ // this workaround runner fixes the coverage problem, BUT doesn't work
+ // with android studio single test execution. use it to generate coverage
+ // data, but keep the other one otherwis
+ // testInstrumentationRunner "org.sufficientlysecure.keychain.JacocoWorkaroundJUnitRunner"
}
compileOptions {
@@ -143,9 +149,8 @@ android {
// Reference them in .xml files.
resValue "string", "account_type", "org.sufficientlysecure.keychain.debug.account"
- // Disabled: only works for androidTest not test!
// Enable code coverage (Jacoco)
- //testCoverageEnabled true
+ testCoverageEnabled true
}
}
@@ -198,6 +203,8 @@ android {
}
}
+// apply plugin: 'spoon'
+
task jacocoTestReport(type:JacocoReport) {
group = "Reporting"
description = "Generate Jacoco coverage reports"
@@ -216,7 +223,10 @@ task jacocoTestReport(type:JacocoReport) {
"${buildDir}/generated/source/buildConfig/debug",
"${buildDir}/generated/source/r/debug"
])
- executionData = files("${buildDir}/jacoco/testDebug.exec")
+ executionData = files([
+ "${buildDir}/jacoco/testDebug.exec",
+ "${buildDir}/outputs/code-coverage/connected/coverage.ec"
+ ])
reports {
xml.enabled = true