diff --git a/uhabits-android/build.gradle b/uhabits-android/build.gradle index ffb39fd65..70cd1dca7 100644 --- a/uhabits-android/build.gradle +++ b/uhabits-android/build.gradle @@ -80,7 +80,6 @@ dependencies { androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1' androidTestImplementation 'com.google.dagger:dagger:2.9' androidTestImplementation 'com.linkedin.testbutler:test-butler-library:1.3.1' - androidTestImplementation "org.mockito:mockito-android:2.8.9" androidTestCompileOnly 'com.google.auto.factory:auto-factory:1.0-beta3' androidTestImplementation 'com.android.support:support-annotations:25.3.1' androidTestImplementation 'com.android.support.test:rules:0.5' @@ -88,6 +87,12 @@ dependencies { androidTestImplementation 'com.google.guava:guava:20.0' androidTestImplementation project(":uhabits-core") + // mockito-android 2+ includes net.bytebuddy, which causes tests to fail. + // Excluding the package net.bytebuddy on AndroidManifest.xml breaks some + // AndroidJUnitRunner functionality, such as running individual methods. + androidTestImplementation "org.mockito:mockito-core:1+" + androidTestImplementation "com.google.dexmaker:dexmaker-mockito:+" + testAnnotationProcessor 'com.google.auto.factory:auto-factory:1.0-beta3' testAnnotationProcessor 'com.google.dagger:dagger-compiler:2.9' testAnnotationProcessor 'com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT' @@ -140,4 +145,4 @@ task coverageReport(type: JacocoReport) { sourceDirectories = files(androidSrc) classDirectories = files(fileTree(dir: androidClasses, excludes: excludes)) executionData = files(jvmExecData, connectedExecData) -} \ No newline at end of file +} diff --git a/uhabits-android/src/androidTest/AndroidManifest.xml b/uhabits-android/src/androidTest/AndroidManifest.xml deleted file mode 100644 index f5c89202e..000000000 --- a/uhabits-android/src/androidTest/AndroidManifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - \ No newline at end of file