android-studio-unit-test-plugin
android-studio-unit-test-plugin copied to clipboard
Plugin Uses testCompile as well as androidTestCompile
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
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.
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.