-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Summary
The Stripe Terminal library includes a dependency on a .jar called bbpossdk-1.7-all.jar
. This .jar includes JUnit classes that conflict with JUnit dependency in an androidTest variant, but only in a library module.
Additionally it appears that the JUnit dependencies are a part of the main source set for bbpossdk, which means that JUnit testing annotations are available on the main source set for our project (which is not ideal, but less important than the fact we can't compile our UI tests).
Running assembleAndroidTest on a library project results in many errors like this:
Duplicate class org.junit.validator.ValidateWith found in modules jetified-junit-4.12.jar (junit:junit:4.12) and jetified-stripeterminal-1.0.8-runtime.jar (com.stripe:stripeterminal:1.0.8)
And additionally has this issue:
> More than one file was found with OS independent path 'junit/runner/logo.gif'
Code to reproduce
I have attached a .zip file containing a project that reproduces this issue. There are three modules in the project; app, library, and standaloneapp.
If you run library:assembleAndroidTest, you will reproduce the issue. If you run standaloneapp:assembleAndroidTest you will see that an app module with a dependency on the stripe terminal SDK does not have the same problem. You can also see that running :app:assembleAndroidTest also succeeds, even though it has a dependency on the :library module.
Android version
N/A - cannot compile androidTest build variant
Impacted devices (Android devices or readers)
N/A - cannot compile androidTest build variant
SDK version
1.0.8
Other information
See attached .zip for sample project to reproduce