summaryrefslogtreecommitdiff
path: root/test-runner/Android.bp
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2018-02-14 10:36:16 +0000
committerJiyong Park <jiyong@google.com>2018-02-18 21:47:42 +0900
commit001d87c81f2f2dba7b0440f50d2a1368d95de5d7 (patch)
tree05aad1ab2876ead89366d25a868b7599899bf200 /test-runner/Android.bp
parentc3e4916301b421700ca80a338c6086c5cb33a844 (diff)
Build android.test.base/legacy against SDK
android.test.legacy is now build against SDK, thus available to apps build with SDK. In doing so, android.test.mock.stubs had to be built with SDK (because it is used by android.test.legacy). However, this wasn't trivial. The problem was that some classes in test-mock implemented abstract methods of platform classes. Even though they are marked as @hide, doclava automatically emit them to the stub file because otherwise the class in the stub file does not implement some abstract methods from its parent class, which in turn makes the stub file non-compilable. This CL solves the problem by introducing an adapter class in between the class in test-mock and the class in the framework. The adapter class implements abstract methods which are @hide and having reference to types that aren't available to SDK. The abstract methods are removed from the original class. Then doclava does not emit the abstract methods. Also by @hide'ing the adapter classes, they are not compiled when building the stub library. Bug: 30188076 Bug: 73339598 Test: m -j android.test.base Test: m -j android.test.legacy Test: m -j android.test.mock.stubs are successful and do not show link-check warning Change-Id: I8e432950e693ee3c6f0240852e62da6133d31571
Diffstat (limited to 'test-runner/Android.bp')
-rw-r--r--test-runner/Android.bp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-runner/Android.bp b/test-runner/Android.bp
index 66b95271ee06..938bb4efe7ba 100644
--- a/test-runner/Android.bp
+++ b/test-runner/Android.bp
@@ -33,8 +33,8 @@ java_library {
// Build the android.test.runner-minus-junit library
// =================================================
-// This is only intended for inclusion in the android.test.legacy and
-// legacy-android-test static libraries and must not be used elsewhere.
+// This is only intended for inclusion in the legacy-android-test static
+// library and must not be used elsewhere.
java_library {
name: "android.test.runner-minus-junit",