diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-06-17 19:56:13 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-06-17 19:56:13 +0200 |
commit | 300fd8e0f26c328aa351318fdea17485d2d940d4 (patch) | |
tree | d028024da0370f50eeed4bb1a76cf9c1a7baeb36 /OpenKeychain/build.gradle | |
parent | 0b3317600bf7641425cfacb9709333c11a897414 (diff) | |
parent | 04d2b6a5076a1a7264687999152f8c24ece773ab (diff) | |
download | open-keychain-300fd8e0f26c328aa351318fdea17485d2d940d4.tar.gz open-keychain-300fd8e0f26c328aa351318fdea17485d2d940d4.tar.bz2 open-keychain-300fd8e0f26c328aa351318fdea17485d2d940d4.zip |
Merge pull request #1352 from open-keychain/v/instrument
instrumentation branch
Diffstat (limited to 'OpenKeychain/build.gradle')
-rw-r--r-- | OpenKeychain/build.gradle | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle index 511183d10..e2d1dd8c8 100644 --- a/OpenKeychain/build.gradle +++ b/OpenKeychain/build.gradle @@ -21,10 +21,14 @@ dependencies { testCompile 'org.robolectric:robolectric:3.0-rc3' // UI testing with Espresso - androidTestCompile 'com.android.support.test:runner:0.2' - androidTestCompile 'com.android.support.test:rules:0.2' - androidTestCompile 'com.android.support.test.espresso:espresso-core:2.1' - androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.1' + androidTestCompile 'com.android.support.test:runner:0.3' + androidTestCompile 'com.android.support.test:rules:0.3' + androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2' + androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.2') { + exclude group: 'com.android.support', module: 'appcompat' + exclude group: 'com.android.support', module: 'support-v4' + exclude module: 'recyclerview-v7' + } // Temporary workaround for bug: https://code.google.com/p/android-test-kit/issues/detail?id=136 // from https://github.com/googlesamples/android-testing/blob/master/build.gradle#L21 @@ -110,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 { @@ -139,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 } } @@ -194,6 +203,8 @@ android { } } +// apply plugin: 'spoon' + task jacocoTestReport(type:JacocoReport) { group = "Reporting" description = "Generate Jacoco coverage reports" @@ -212,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 |