screenshot-tests-for-android icon indicating copy to clipboard operation
screenshot-tests-for-android copied to clipboard

Add dependency in com.android.test module differently

Open JakeWharton opened this issue 7 years ago • 3 comments

Detect this case and use compile (or more correctly, implementation) instead of androidTestCompile.

JakeWharton avatar Jul 11 '17 02:07 JakeWharton

Workaround for now:

// TODO workaround for https://github.com/facebook/screenshot-tests-for-android/issues/74
configurations {
  androidTestCompile
  implementation.extendsFrom(androidTestCompile)
}
// TODO move this back up to the top of the file once the above issue is fixed.
apply plugin: 'com.facebook.testing.screenshot'

JakeWharton avatar Jul 11 '17 02:07 JakeWharton

What is the issue, exactly?

sridhar-vadlamani-ck avatar Jul 16 '17 23:07 sridhar-vadlamani-ck

In a test module, the runtime dependency is added to androidTestCompile instead of compile.

JakeWharton avatar Jul 16 '17 23:07 JakeWharton