Merge "Pin libraries needed by vogar tool to java 1.7"
am: 37478fb551
* commit '37478fb5517bff62a71778a1b58f3033c618494f':
Pin libraries needed by vogar tool to java 1.7
diff --git a/Android.mk b/Android.mk
index 81b6819..ddceaea 100644
--- a/Android.mk
+++ b/Android.mk
@@ -29,6 +29,7 @@
LOCAL_JAVA_LIBRARIES := junit objenesis-host ant
LOCAL_MODULE := mockito-host
LOCAL_MODULE_TAGS := optional
+LOCAL_JAVA_LANGUAGE_VERSION := 1.7
include $(BUILD_HOST_JAVA_LIBRARY)
@@ -76,8 +77,18 @@
include $(CLEAR_VARS)
LOCAL_MODULE := mockito-target
-LOCAL_STATIC_JAVA_LIBRARIES := mockito-api dexmaker dexmaker-mockmaker \
- objenesis-target junit4-target
+LOCAL_STATIC_JAVA_LIBRARIES := mockito-target-minus-junit4 junit4-target
+LOCAL_SDK_VERSION := 10
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+# A mockito target that doesn't pull in junit4-target. This is used to work around
+# issues caused by multiple copies of junit4 in the classpath, usually when a test
+# using mockito is run using android.test.runner.
+include $(CLEAR_VARS)
+LOCAL_MODULE := mockito-target-minus-junit4
+LOCAL_STATIC_JAVA_LIBRARIES := mockito-api dexmaker dexmaker-mockmaker objenesis-target
+LOCAL_JAVA_LIBRARIES := junit4-target
LOCAL_SDK_VERSION := 10
LOCAL_MODULE_TAGS := optional
LOCAL_JAVA_LANGUAGE_VERSION := 1.7