summaryrefslogtreecommitdiff
path: root/test-base/hiddenapi
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-01-27 11:32:54 +0000
committerPaul Duffin <paulduffin@google.com>2021-02-16 18:00:53 +0000
commit67668969e8f5148d8f954d00b4ad8934a9722ad3 (patch)
treeb4c362f5d692f1a755a6a545c17a67324e88247c /test-base/hiddenapi
parent2a2456d3a41109c7ec9376c56ed0c61f284c6b1f (diff)
Add explicit dependency from android.test.base to hiddenapi annotations
Previously, the dependency was implicit by name. This change makes it explicit. The android.test.base-hiddenapi is renamed to prevent the implicit dependency being discovered. A follow up change will remove that capability from Soong. Test: m droid Verified that hiddenapi files (both aggregated ones and for the individual modules) are not affected by this change. Change-Id: I6fb96311e3a15cc341a0d64817921dd99d6e683e
Diffstat (limited to 'test-base/hiddenapi')
-rw-r--r--test-base/hiddenapi/Android.bp15
1 files changed, 8 insertions, 7 deletions
diff --git a/test-base/hiddenapi/Android.bp b/test-base/hiddenapi/Android.bp
index d4f52d0fc6cd..1466590ef311 100644
--- a/test-base/hiddenapi/Android.bp
+++ b/test-base/hiddenapi/Android.bp
@@ -14,11 +14,6 @@
// limitations under the License.
//
-// Provided solely to contribute information about which hidden parts of the android.test.base
-// library are used by apps. The source files are stubs of the actual files in ../src which use the
-// UnsupportedAppUsage annotation to tag those methods that are accessible via the hiddenapi.
-// Relies on the convention that modules with name <x>-hiddenapi provide hiddenapi information for
-// module <x> that is on the bootclasspath.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
@@ -28,14 +23,20 @@ package {
default_applicable_licenses: ["frameworks_base_license"],
}
+// Provided solely to contribute information about which hidden parts of the android.test.base
+// library are used by apps. The source files are stubs of the actual files in ../src which use the
+// UnsupportedAppUsage annotation to tag those methods that are accessible via the hiddenapi.
java_library {
- name: "android.test.base-hiddenapi",
+ name: "android.test.base-hiddenapi-annotations",
compile_dex: true,
srcs: ["src/**/*.java"],
libs: [
- "android.test.base",
+ // Use this instead of `android.test.base` to avoid a dependency cycle
+ // as `android.test.base` depends on this.
+ "android.test.base-minus-junit",
+ "junit",
"unsupportedappusage",
],
}