summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test-base/Android.bp20
-rw-r--r--test-runner/Android.mk15
2 files changed, 35 insertions, 0 deletions
diff --git a/test-base/Android.bp b/test-base/Android.bp
index a42dc5a10ec9..ccf57b00a379 100644
--- a/test-base/Android.bp
+++ b/test-base/Android.bp
@@ -64,6 +64,26 @@ java_library_static {
jarjar_rules: "jarjar-rules.txt",
}
+// Build the android.test.base-minus-junit library
+// ===============================================
+// This contains the android.test classes from android.test.base plus
+// the com.android.internal.util.Predicate[s] classes. This is only
+// intended for inclusion in the android.test.legacy static library and
+// must not be used elsewhere.
+java_library_static {
+ name: "android.test.base-minus-junit",
+
+ srcs: [
+ "src/android/**/*.java",
+ "src/com/**/*.java",
+ ],
+
+ sdk_version: "current",
+ libs: [
+ "junit",
+ ],
+}
+
// Build the legacy-android-test library
// =====================================
// This contains the android.test classes that were in Android API level 25,
diff --git a/test-runner/Android.mk b/test-runner/Android.mk
index 706f6364ef8d..f5c2bc690494 100644
--- a/test-runner/Android.mk
+++ b/test-runner/Android.mk
@@ -117,5 +117,20 @@ update-android-test-runner-api: $(ANDROID_TEST_RUNNER_OUTPUT_API_FILE) | $(ACP)
endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
+# Build the android.test.legacy library
+# =====================================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := android.test.legacy
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src/android)
+
+LOCAL_SDK_VERSION := current
+
+LOCAL_JAVA_LIBRARIES := android.test.mock.stubs junit
+LOCAL_STATIC_JAVA_LIBRARIES := android.test.base-minus-junit
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
# additionally, build unit tests in a separate .apk
include $(call all-makefiles-under,$(LOCAL_PATH))