android-studio-unit-test-plugin icon indicating copy to clipboard operation
android-studio-unit-test-plugin copied to clipboard

Plugin Uses testCompile as well as androidTestCompile

Open Neristance opened this issue 10 years ago • 2 comments

Hi There,

I just was trying out your plugin and found out that it somehow uses both dependencies:

the ones from testCompile for the robolectric plugin as well as androidTestCompile which ich use to run my androidUnitTest / EspressoTests.

Could you check if this is true because if i comment the androidTestCompile out it isn't compiling.

If i run the stuff on command line everything works fine

Additionally the plugin overrides for example the jvmArgs or doesn't inherit the arguments from the junit template or robolectric plugin (version 2.1.1)

Cheers Neristance

Neristance avatar Dec 17 '14 08:12 Neristance

Are you talking about https://github.com/robolectric/robolectric-gradle-plugin? If so, this is incompatible with that, you should be using https://github.com/JCAndKSolutions/android-unit-test instead. Otherwise, I'm not sure what's going on, neither android-unit-test nor this touches androidTestCompile in any way.

As for jvmArgs, you are right, they are not read from the gradle config, and they are currently hardcoded in the run configuration because certain parameters are needed to robolectric to work.

evant avatar Dec 18 '14 18:12 evant

I believe I'm experiencing a similar issue. My androidTestCompile dependencies appear like testCompile dependencies when executing the unit tests from Android Studio. However, the tests work fine from the command line. The odd thing is that the dependencies task, also run from the command line, shows these androidTestCompile dependencies on the _debugTestCompile task which seems inappropriate.

niedzielski avatar Jan 19 '15 04:01 niedzielski