linkedin / test-butler

Reliable Android Testing, at your service
Apache License 2.0
1.05k stars 92 forks source link

Lost transitive dependencies during mavenCentral migration #121

Closed TWiStErRob closed 2 years ago

TWiStErRob commented 2 years ago

While upgrading from 2.1.1 to 2.2.1 we noticed that some dependencies disappeared from gradlew :app:dependencies. Specifically junit + test-butler-api, and I can confirm this by noticing that they went from compile to runtime here: https://mvnrepository.com/artifact/com.linkedin.testbutler/test-butler-library/2.1.1

https://mvnrepository.com/artifact/com.linkedin.testbutler/test-butler-library/2.2.1

Was this an intentional change?

TWiStErRob commented 2 years ago

Note: they still exist on debugAndroidTestRuntimeClasspath - Runtime classpath of compilation 'googleDebugAndroidTest' (target (androidJvm))., so I think most users are fine, unless they accessed code from -api which is essentially com.linkedin.android.testbutler.ButlerApi.Stub.Proxy. I think users will be fine, but maybe worth noting in changelog?

drewhannay commented 2 years ago

Good catch. It may not have been intentional, but I think it's correct. Really I think the bug is we didn't realize these dependencies were leaking to the compile classpath before this change 😄

We were already declaring them as implementation dependencies, but I think our old publishing setup was incorrect and declaring it as an api dependency in the published artifact files. Now it's being correctly published as implementation (aka runtime) which explains what you're seeing.

TWiStErRob commented 2 years ago

Agreed, sounds good.

Will you update these?

As it might be effectively a suprise breaking change if someone got junit transitively from butler and they update a minor/patch version.

Other than doc updates, happy to close.

drewhannay commented 2 years ago

Done!

TWiStErRob commented 2 years ago

Cheers! Thanks for the quick turnaround!