rgladwell/m2e-android — Issue #52: Android dependency for robolectric / run configuration
Author: pyricau
Created: 2011-11-03 14:58:10+00:00
State: open

Hello there,

I use Robolectric for the test project of AndroidAnnotations.

In the latest versions of m2e-android, it seems that the Android dependency disappeared from the Maven dependencies. If I understand well, that's because ADT 14 handle things differently, and doesn't like it to be there (if you have any link / issue number on that subject, I am eager to learn more...)

When using Robolectric, I create a run configuration that runs my Android code with a custom JUnit runner, without any need to start an emulator.

This runner needs android's jar in its classpath. With the latest changes, it is removed from the maven deps, so the tests fail with classnotfound exceptions.

I used to have this :

com.google.android
android
1.5_r4
provided

I tried changing to test scope :

com.google.android
android
1.5_r4
test

The eclipse test runner started working, but building the command line wouldn't work any more, because the dependency was not available at compile time.

Any hint ?