Due to issues with Eclipse's in-abilty to filter and group classpath as Maven (see issues #52, '53, #58 and #62) can, we need to replace the default ADT APK Builder with a Maven ADT Builder that will filter out provided scope dependencies and support android-maven-plugin features.
See here for further discussion:
I'll be following this.
If Maven ADT Builder will be faster I vote for it. But for now is ADT APK Builder much faster than build with maven itself (from commandline) or view Eclipse (run As -> Maven Build...)
@tprochazka unfortunately, we may not have a choice but to go back to the Maven ADT Builder. Eclipse does not recognise different scopes of dependencies like Maven (compile, provided, etc.) so we may have to go back for this reason. Obviously, wrapping the native ADT builder to support maven scopes etc. might have performance issues, the question is whether these will be significant.
It depends on whether it will be possible use compile on save functionality, reuse already generated R.class or already packed resources and merging .dex in the future. I also hope that aapt.exe will be rewritten to the something (like Java) which allow incremental update and stop progress if some change happen during build (like it now block whole Eclipse if I save any file during on save build progress). Like Eclipse do class compile on save, it also doesn't use javac.exe. And I also hope for hot swap class support in future version of Android VM, like Java does.
Recent investigation digging around inside the ADT code indicates replacing the ADT APK builder is no longer possible, certainly not without a patch against the ADT. Removing "important" label.
I can't say how much this issue is related to issue #8 but today I tried a maven configuration (that worked perfectly fine via command line using mvn) where my robolectric tests where included inside an apk project in src/test/java. It didn't work at all as test dependencies (mostly robolectric and transitive dependencies) where included in the apk that was deployed to the device / emulator when running the project via eclipse.
Test scoped dependencies were not treated properly in that configuration and I believe the issue to be still open.
Sample project that fails to be run in eclipse but works fine with maven can be found here.
@stephanenicolas this issue is still open, its just "Closed" appears above for a few issues related to this ticket that were closed.
I stumbled upon the same problem like @stephanenicolas.
Is there any known workaround (like specifying the test dependencies in the parent pom and reference them again in the app's pom, but only with "provided"), or is moving the tests into a separate module the only option?
Roboelectric support is a known issue that is currently being worked on, see issue #52
Fixed by b2aa3