Closed inhaledesign closed 4 years ago
and what's your gradle setup that causes those conflicts? are you sure it's related to this library?
I'm positive it's this library. Everything else I use for testing that uses UIAutomator strictly uses the AndroidX package
androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiautomator_version"
This library does not use it: https://github.com/blipinsk/disable-animations-rule/blob/da80cc29b0ea3f7d0aedf58b77a38b74d1b8951d/disable-animations-rule/build.gradle#L16
I'm not really sure what the right fix is, or if it needs to be fixed. But it seems like supporting AndroidX would be a good idea.
I'm not really sure what the right fix is, or if it needs to be fixed. But it seems like supporting AndroidX would be a good idea.
I see no problem in doing that.
It's just interesting that the jetifier
does not seem to be working for androidTest
dependencies then... 🤔
Thanks for reporting that 💪
For reference, here's my gradle file:
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 18
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
animationsDisabled true
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ":utils")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation "org.jetbrains.anko:anko:$anko_version"
androidTestUtil 'androidx.test:orchestrator:1.2.0'
androidTestImplementation project(path: ":utilstestandroid")
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiautomator_version"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'com.bartoszlipinski:disable-animations-rule:1.0.0'
}
The same problem with my project: "Duplicate class androidx.test.uiautomator...." when I add androidTestImplementation 'com.bartoszlipinski:disable-animations-rule:1.0.0'
@inhaledesign @sovvly version 2.0.0 includes androidx dependencies. Thanks!
Getting the following error:
...and about twenty more similar lines.
I'm sure I can mange the conflicts in Gradle, but would be nice to not have to.