Cleanup Android.bp:framework-virtualization
There are a bunch of variables that are already set in the
framework-module-defaults, so there is no need to duplicate them.
Also disable the JavaApiUsedByMainlineModule check, since we are not an
updatable module we don't need it, and it's quite spammy.
As a side effect of this change our tests & demo apks need to compile
against framework-virtualization.impl library (which includes the hidden
APIs). Once the APIs are promoted to @SystemApi we can change the tests
to compile against framework-virtualization (which contains the API
stubs).
Bug: 243512044
Test: presubmit
Change-Id: Ib614d266f7a9cb8517afccd4feb737068b51fb20
diff --git a/javalib/Android.bp b/javalib/Android.bp
index 04ed273..9be0e9d 100644
--- a/javalib/Android.bp
+++ b/javalib/Android.bp
@@ -12,19 +12,10 @@
java_sdk_library {
name: "framework-virtualization",
- installable: false,
- compile_dex: true,
// TODO(b/243512044): introduce non-updatable-framework-module-defaults
-
defaults: ["framework-module-defaults"],
- shared_library: false,
-
- default_to_stubs: false,
-
- dist_group: "android",
-
jarjar_rules: "jarjar-rules.txt",
srcs: ["src/**/*.java"],
@@ -43,43 +34,30 @@
"com.android.system.virtualmachine.sysprop",
],
errorprone: {
- // We use @GuardedBy and we want a test failure if our locking isn't consistent with it.
enabled: true,
javacflags: [
+ // We use @GuardedBy and we want a test failure if our locking isn't consistent with it.
"-Xep:GuardedBy:ERROR",
+ // JavaApiUsedByMainlineModule is quite spammy, and since we com.android.virt is not
+ // an updatable module we don't need it.
+ "-Xep:JavaApiUsedByMainlineModule:OFF",
],
},
- public: {
- enabled: true,
- sdk_version: "module_current",
- },
-
- system: {
- enabled: true,
- sdk_version: "module_current",
- },
-
- module_lib: {
- enabled: true,
- sdk_version: "module_current",
- },
-
test: {
enabled: true,
sdk_version: "module_current",
},
sdk_version: "core_platform",
- platform_apis: true,
impl_only_libs: [
"framework",
],
impl_library_visibility: [
- "//frameworks/base",
+ "//packages/modules/Virtualization:__subpackages__",
],
- // Temporary workaround, will be removed in a follow-up child cl.
+ // TODO(b/243512044): remove once we have API tracking files in prebuilts/sdk
unsafe_ignore_missing_latest_api: true,
}