Merge changes from topic "jacoco-asm"

* changes:
  Run Robolectric -jacoco builds with JDK8
  Depend on asm in m2 directory
diff --git a/common/android-support-test/Android.mk b/common/android-support-test/Android.mk
index 9b94ad5..08f9b33 100644
--- a/common/android-support-test/Android.mk
+++ b/common/android-support-test/Android.mk
@@ -14,17 +14,17 @@
 
 LOCAL_PATH:= $(call my-dir)
 
-# for Android JUnit runner and rules
+# for Android JUnit runner, monitor and rules
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-test
 LOCAL_SDK_VERSION := 15
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test-rules-nodep android-support-test-runner-nodep junit hamcrest hamcrest-library android-support-annotations
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-test-rules-nodep android-support-test-runner-nodep junit hamcrest hamcrest-library android-support-annotations android-support-test-monitor-nodep
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-test-nodep
 LOCAL_SDK_VERSION := 23
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test-rules-nodep android-support-test-runner-nodep
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-test-rules-nodep android-support-test-runner-nodep android-support-test-monitor-nodep
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -49,12 +49,23 @@
 LOCAL_UNINSTALLABLE_MODULE := true
 include $(BUILD_PREBUILT)
 
+include $(CLEAR_VARS)
+LOCAL_MODULE := android-support-test-monitor-nodep
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := monitor/monitor_release_no_deps.jar
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_SDK_VERSION := 15
+# Uninstallable static Java libraries.
+LOCAL_UNINSTALLABLE_MODULE := true
+include $(BUILD_PREBUILT)
+
 # for espresso-core
 include $(CLEAR_VARS)
 LOCAL_MODULE := espresso-core
 LOCAL_MODULE_TAGS := optional
 LOCAL_SDK_VERSION := 15
-LOCAL_STATIC_JAVA_LIBRARIES := espresso-core-nodep espresso-idling-resource-nodep android-support-test-rules-nodep android-support-test-runner-nodep junit hamcrest hamcrest-library android-support-annotations jsr330
+LOCAL_STATIC_JAVA_LIBRARIES := espresso-core-nodep espresso-idling-resource-nodep android-support-test-rules-nodep android-support-test-runner-nodep android-support-test-monitor-nodep junit hamcrest hamcrest-library android-support-annotations jsr330
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -65,6 +76,7 @@
 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
 # Uninstallable static Java libraries.
 LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := 15
 include $(BUILD_PREBUILT)
 
 # for espresso-contrib
@@ -83,6 +95,7 @@
 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
 # Uninstallable static Java libraries.
 LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := 15
 include $(BUILD_PREBUILT)
 
 # for espresso-idling-resource
@@ -94,6 +107,7 @@
 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
 # Uninstallable static Java libraries.
 LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := 15
 include $(BUILD_PREBUILT)
 
 # for espresso-intents
@@ -112,6 +126,7 @@
 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
 # Uninstallable static Java libraries.
 LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := 15
 include $(BUILD_PREBUILT)
 
 # for espresso-web
@@ -130,4 +145,5 @@
 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
 # Uninstallable static Java libraries.
 LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_SDK_VERSION := 15
 include $(BUILD_PREBUILT)
diff --git a/common/android-support-test/PREBUILT b/common/android-support-test/PREBUILT
index af29e0e..964bf06 100644
--- a/common/android-support-test/PREBUILT
+++ b/common/android-support-test/PREBUILT
@@ -1 +1,4 @@
-Artifacts built from google3 atsl_6.0_alpha_2_release_branch
+Artifacts built from google3 atsl_1.0.2_alpha1_release_branch
+https://cs.corp.google.com/piper///depot/branches/atsl_1.0.2_alpha1_release_branch
+
+Release note: https://developer.android.com/topic/libraries/testing-support-library/release-notes.html
diff --git a/common/android-support-test/espresso/espresso_contrib_release_no_deps.jar b/common/android-support-test/espresso/espresso_contrib_release_no_deps.jar
index eb74119..12a0742 100755
--- a/common/android-support-test/espresso/espresso_contrib_release_no_deps.jar
+++ b/common/android-support-test/espresso/espresso_contrib_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/espresso/espresso_core_release_no_deps.jar b/common/android-support-test/espresso/espresso_core_release_no_deps.jar
index a795f6b..05237a8 100755
--- a/common/android-support-test/espresso/espresso_core_release_no_deps.jar
+++ b/common/android-support-test/espresso/espresso_core_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/espresso/espresso_idling_resource_release_no_deps.jar b/common/android-support-test/espresso/espresso_idling_resource_release_no_deps.jar
index bd844b1..a453041 100755
--- a/common/android-support-test/espresso/espresso_idling_resource_release_no_deps.jar
+++ b/common/android-support-test/espresso/espresso_idling_resource_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/espresso/espresso_intents_release_no_deps.jar b/common/android-support-test/espresso/espresso_intents_release_no_deps.jar
index c87e5aa..2a4f67f 100755
--- a/common/android-support-test/espresso/espresso_intents_release_no_deps.jar
+++ b/common/android-support-test/espresso/espresso_intents_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/espresso/espresso_web_release_no_deps.jar b/common/android-support-test/espresso/espresso_web_release_no_deps.jar
index 8d6f92f..bf89428 100755
--- a/common/android-support-test/espresso/espresso_web_release_no_deps.jar
+++ b/common/android-support-test/espresso/espresso_web_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/monitor/monitor_release_no_deps.jar b/common/android-support-test/monitor/monitor_release_no_deps.jar
new file mode 100755
index 0000000..316ca2f
--- /dev/null
+++ b/common/android-support-test/monitor/monitor_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/rules/rules_release_no_deps.jar b/common/android-support-test/rules/rules_release_no_deps.jar
index 8ad41ac..e67311a 100755
--- a/common/android-support-test/rules/rules_release_no_deps.jar
+++ b/common/android-support-test/rules/rules_release_no_deps.jar
Binary files differ
diff --git a/common/android-support-test/runner/runner_release_no_deps.jar b/common/android-support-test/runner/runner_release_no_deps.jar
index 9e538ee..1ff03e9 100755
--- a/common/android-support-test/runner/runner_release_no_deps.jar
+++ b/common/android-support-test/runner/runner_release_no_deps.jar
Binary files differ
diff --git a/common/robolectric/3.1.1/Android.mk b/common/robolectric/3.1.1/Android.mk
index 4b92a1c..9f8bc64 100644
--- a/common/robolectric/3.1.1/Android.mk
+++ b/common/robolectric/3.1.1/Android.mk
@@ -28,11 +28,24 @@
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
+###########################
+# Macro for defining individual prebuilts from <name>:<file> lists
+define define-prebuilt
+  $(eval tw := $(subst :, ,$(strip $(1)))) \
+  $(eval include $(CLEAR_VARS)) \
+  $(eval LOCAL_MODULE := $(word 1,$(tw))) \
+  $(eval LOCAL_MODULE_TAGS := optional) \
+  $(eval LOCAL_MODULE_CLASS := JAVA_LIBRARIES) \
+  $(eval LOCAL_SRC_FILES := $(word 2,$(tw))) \
+  $(eval LOCAL_UNINSTALLABLE_MODULE := true) \
+  $(eval LOCAL_SDK_VERSION := current) \
+  $(eval include $(BUILD_PREBUILT))
+endef
+
 ############################
 # Defining the target names for the static prebuilt .JARs.
-include $(CLEAR_VARS)
 
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+prebuilts := \
     platform-robolectric-annotations:lib/robolectric-annotations-3.1.1.jar \
     platform-robolectric-multidex:lib/shadows-multidex-3.1.1.jar \
     platform-robolectric-resources:lib/robolectric-resources-3.1.1.jar \
@@ -47,7 +60,10 @@
     platform-robolectric-shadows-httpclient:lib/shadows-httpclient-3.1.1.jar\
     platform-robolectric-snapshot:lib/robolectric-3.1.1.jar
 
-include $(BUILD_MULTI_PREBUILT)
+$(foreach p,$(prebuilts),\
+  $(call define-prebuilt,$(p)))
+
+prebuilts :=
 
 include $(CLEAR_VARS)
 
@@ -57,6 +73,7 @@
 LOCAL_SRC_FILES := lib/robolectric-utils-3.1.1.jar
 LOCAL_UNINSTALLABLE_MODULE := true
 LOCAL_MIN_SDK_VERSION := o-b1
+LOCAL_SDK_VERSION := current
 
 include $(BUILD_PREBUILT)
 
@@ -75,11 +92,13 @@
 
 ############################
 # Defining the target names for the static prebuilt .JARs.
-include $(CLEAR_VARS)
 
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+prebuilts := \
     asm-5.0.1:lib/asm-5.0.1.jar \
     asm-commons-5.0.1:lib/asm-commons-5.0.1.jar \
     asm-tree-5.0.1:lib/asm-tree-5.0.1.jar
 
-include $(BUILD_MULTI_PREBUILT)
+$(foreach p,$(prebuilts),\
+  $(call define-prebuilt,$(p)))
+
+prebuilts :=
diff --git a/common/robolectric/3.4.2/Android.mk b/common/robolectric/3.4.2/Android.mk
index 60f915a..eb160c8 100644
--- a/common/robolectric/3.4.2/Android.mk
+++ b/common/robolectric/3.4.2/Android.mk
@@ -25,9 +25,8 @@
 
 ############################
 # Defining the target names for the static prebuilt .JARs.
-include $(CLEAR_VARS)
 
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+prebuilts := \
     platform-robolectric-3.4.2-annotations:lib/annotations-3.4.2.jar \
     platform-robolectric-3.4.2-junit:lib/junit-3.4.2.jar \
     platform-robolectric-3.4.2-resources:lib/resources-3.4.2.jar \
@@ -39,4 +38,19 @@
     platform-robolectric-3.4.2-shadows-framework:lib/framework-3.4.2.jar \
     platform-robolectric-3.4.2-shadows-httpclient:lib/httpclient-3.4.2.jar
 
-include $(BUILD_MULTI_PREBUILT)
+define define-prebuilt
+  $(eval tw := $(subst :, ,$(strip $(1)))) \
+  $(eval include $(CLEAR_VARS)) \
+  $(eval LOCAL_MODULE := $(word 1,$(tw))) \
+  $(eval LOCAL_MODULE_TAGS := optional) \
+  $(eval LOCAL_MODULE_CLASS := JAVA_LIBRARIES) \
+  $(eval LOCAL_SRC_FILES := $(word 2,$(tw))) \
+  $(eval LOCAL_UNINSTALLABLE_MODULE := true) \
+  $(eval LOCAL_SDK_VERSION := current) \
+  $(eval include $(BUILD_PREBUILT))
+endef
+
+$(foreach p,$(prebuilts),\
+  $(call define-prebuilt,$(p)))
+
+prebuilts :=
diff --git a/common/robolectric/3.5.1/Android.mk b/common/robolectric/3.5.1/Android.mk
index 0a47901..2a6015f 100644
--- a/common/robolectric/3.5.1/Android.mk
+++ b/common/robolectric/3.5.1/Android.mk
@@ -27,9 +27,8 @@
 
 ############################
 # Defining the target names for the static prebuilt .JARs.
-include $(CLEAR_VARS)
 
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+prebuilts := \
     platform-robolectric-3.5.1-asm:lib/asm-6.0.jar \
     platform-robolectric-3.5.1-annotations:lib/annotations-3.5.1.jar \
     platform-robolectric-3.5.1-junit:lib/junit-3.5.1.jar \
@@ -43,4 +42,19 @@
     platform-robolectric-3.5.1-shadows-httpclient:lib/shadows-httpclient-3.5.1.jar \
     platform-robolectric-3.5.1-shadows-support-v4:lib/shadows-supportv4-3.5.1.jar
 
-include $(BUILD_MULTI_PREBUILT)
+define define-prebuilt
+  $(eval tw := $(subst :, ,$(strip $(1)))) \
+  $(eval include $(CLEAR_VARS)) \
+  $(eval LOCAL_MODULE := $(word 1,$(tw))) \
+  $(eval LOCAL_MODULE_TAGS := optional) \
+  $(eval LOCAL_MODULE_CLASS := JAVA_LIBRARIES) \
+  $(eval LOCAL_SRC_FILES := $(word 2,$(tw))) \
+  $(eval LOCAL_UNINSTALLABLE_MODULE := true) \
+  $(eval LOCAL_SDK_VERSION := current) \
+  $(eval include $(BUILD_PREBUILT))
+endef
+
+$(foreach p,$(prebuilts),\
+  $(call define-prebuilt,$(p)))
+
+prebuilts :=
diff --git a/common/robolectric/3.6.1/Android.mk b/common/robolectric/3.6.1/Android.mk
index 3abd1de..2b50fb6 100644
--- a/common/robolectric/3.6.1/Android.mk
+++ b/common/robolectric/3.6.1/Android.mk
@@ -27,9 +27,8 @@
 
 ############################
 # Defining the target names for the static prebuilt .JARs.
-include $(CLEAR_VARS)
 
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+prebuilts := \
     platform-robolectric-3.6.1-asm:lib/asm-6.0.jar \
     platform-robolectric-3.6.1-annotations:lib/annotations-3.6.1.jar \
     platform-robolectric-3.6.1-junit:lib/junit-3.6.1.jar \
@@ -43,4 +42,19 @@
     platform-robolectric-3.6.1-snapshot:lib/robolectric-3.6.1.jar \
     platform-robolectric-3.6.1-utils:lib/utils-3.6.1.jar
 
-include $(BUILD_MULTI_PREBUILT)
+define define-prebuilt
+  $(eval tw := $(subst :, ,$(strip $(1)))) \
+  $(eval include $(CLEAR_VARS)) \
+  $(eval LOCAL_MODULE := $(word 1,$(tw))) \
+  $(eval LOCAL_MODULE_TAGS := optional) \
+  $(eval LOCAL_MODULE_CLASS := JAVA_LIBRARIES) \
+  $(eval LOCAL_SRC_FILES := $(word 2,$(tw))) \
+  $(eval LOCAL_UNINSTALLABLE_MODULE := true) \
+  $(eval LOCAL_SDK_VERSION := current) \
+  $(eval include $(BUILD_PREBUILT))
+endef
+
+$(foreach p,$(prebuilts),\
+  $(call define-prebuilt,$(p)))
+
+prebuilts :=