testCompile
configuration:"--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
classpath 'com.robolectric.gradle:gradle-android-test-plugin:0.9.+'
should be:
classpath 'org.robolectric.gradle:gradle-android-test-plugin:0.9.+'
anyway, the plugin doesn't work for me, I get:
9:19:27 AM Gradle 'myproject' project refresh failed:
Cannot add task ':my-app:testClasses' as a task with that name already exists.
I don't know if it's because I am using the android plugin 0.8.+, but I'd rather not move backwards.
sorry for not packing feedback together in one post.
Yes, tasty flavors :)
Sent from my Nexus 4
Question about junit and espresso coexisting:
by using instrumentTestCompile robolectric would be dexed also for espresso. When I tried it with robotium, I hit the "too many methods" exception. Isn't it a risk also for espresso?
And why did you choose to move away from testCompile? On the gradle's side Jake's version was almost perfect. Android studio was quite an issue though...
Sent from my Nexus 4
--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
instead of manipulating the iml file you can manipulate the classpath for test runs and include missing build dirs. So you don't must edit the iml file, but the classpath must manually be updated after each dependency change.
step by step inside android studio:
1. start an unit test, it will fail with stub! or missing classes
2. copy to an editor the output from terminal (you only need --classpath "...")
3. edit classpath add additional sources (expecting that you use debug variant)
- cut the path to junit4 and paste it as the first entry
- append at end: /<projectPath>/build/test-classes/debug
- append at end: /<projectPath>/build/resources/testDebug
To the release question:
I like the style having all tests inside the project, which will be tested, but with deckard-gradle the build need to much extra time. Because for unit tests also instrumentation test dependencies are compiled, and for instrumentations test the unit test dependencies. Dex don't like most of the unit test dependencies. Current for me I found it much easier to seperate robolectric test in an extra module, to avoid this mixed dependencies. You see an option to optimise this behaviour? So long i will stay at novodas plugin, here an ready to use example https://github.com/nenick/android-gradle-template
Sorry I forgot to tell that the edited classpath must be used inside vm options at your unit test run configuration.
--
You received this message because you are subscribed to a topic in the Google Groups "Robolectric" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/robolectric/xsOpEwtdTi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to robolectric...@googlegroups.com.