summaryrefslogtreecommitdiff
path: root/test-mock
diff options
context:
space:
mode:
author Anton Hansson <hansson@google.com> 2021-11-24 17:09:32 +0000
committer Anton Hansson <hansson@google.com> 2021-11-24 17:59:16 +0000
commit7a4b9d91f9f02216701be6bba3b7c0dd993fb962 (patch)
treed9e91c7621574c7f4a05b9446be3afd1fc509246 /test-mock
parent0c4d524c3342e4e0284b55f29b022198f99181ea (diff)
Make android.test.mock use api_srcs instead of jarjar
Since the jarjar solution was introduced, api_srcs support was added back to java_sdk_library. Migrate to that. Aside from the slightly simpler setup, I also noticed the jarjar-version left some *.uau and *.xml files in the output jar. Test: diff jar before and after Change-Id: I9724cce159ea4f1b882505f589a9cfe17a880514
Diffstat (limited to 'test-mock')
-rw-r--r--test-mock/Android.bp11
-rw-r--r--test-mock/jarjar-rules.txt7
2 files changed, 2 insertions, 16 deletions
diff --git a/test-mock/Android.bp b/test-mock/Android.bp
index 0bb61987a514..22320fd53631 100644
--- a/test-mock/Android.bp
+++ b/test-mock/Android.bp
@@ -27,9 +27,8 @@ package {
java_sdk_library {
name: "android.test.mock",
-
- srcs: [
- ":android-test-mock-sources",
+ srcs: [":android-test-mock-sources"],
+ api_srcs: [
// Note: Below are NOT APIs of this library. We only take APIs under
// the android.test.mock package. They however provide private APIs that
// android.test.mock APIs references to. We need to have the classes in
@@ -44,15 +43,9 @@ java_sdk_library {
"app-compat-annotations",
"unsupportedappusage",
],
-
api_packages: [
"android.test.mock",
],
- // Only include android.test.mock.* classes. Jarjar rules below removes
- // classes in other packages like android.content. In order to keep the
- // list up-to-date, permitted_packages ensures that the library contains
- // clases under android.test.mock after the jarjar rules are applied.
- jarjar_rules: "jarjar-rules.txt",
permitted_packages: [
"android.test.mock",
],
diff --git a/test-mock/jarjar-rules.txt b/test-mock/jarjar-rules.txt
deleted file mode 100644
index 4420a4413f5b..000000000000
--- a/test-mock/jarjar-rules.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-zap android.accounts.**
-zap android.app.**
-zap android.content.**
-zap android.database.**
-zap android.os.**
-zap android.util.**
-zap android.view.**