blob: 98fa53ddcbf87f09cfb9646fb0a05a552fdecbdc [file] [log] [blame]
Jiyong Park9b8253b2021-06-28 18:37:26 +09001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5java_sdk_library {
Nikita Ioffef28eec22022-10-18 23:17:34 +01006 name: "framework-virtualization",
Jiyong Park9b8253b2021-06-28 18:37:26 +09007
Nikita Ioffe6d340a22022-12-06 14:16:20 +00008 defaults: ["non-updatable-framework-module-defaults"],
Nikita Ioffe30b50e62022-11-15 11:27:45 +00009
Alan Stokes5c1d9c02022-09-01 11:10:32 +010010 jarjar_rules: "jarjar-rules.txt",
11
Nikita Ioffe9ab470c2024-08-22 14:06:08 +000012 srcs: [
13 "src/**/*.java",
14 ":avf-build-flags-java-gen",
15 ],
Jiyong Park9b8253b2021-06-28 18:37:26 +090016 static_libs: [
17 "android.system.virtualizationservice-java",
Nikita Ioffe82a40132024-12-11 16:20:36 +000018 "avf_aconfig_flags_java",
Alan Stokes5c1d9c02022-09-01 11:10:32 +010019 // For android.sysprop.HypervisorProperties
20 "PlatformProperties",
Jiyong Park9b8253b2021-06-28 18:37:26 +090021 ],
22
23 apex_available: ["com.android.virt"],
Nikita Ioffef28eec22022-10-18 23:17:34 +010024
Jiyong Park9b8253b2021-06-28 18:37:26 +090025 permitted_packages: [
26 "android.system.virtualmachine",
27 "android.system.virtualizationservice",
Alan Stokes5c1d9c02022-09-01 11:10:32 +010028 // android.sysprop.*, renamed by jarjar
29 "com.android.system.virtualmachine.sysprop",
Jiyong Park9b8253b2021-06-28 18:37:26 +090030 ],
Alan Stokes36a58d92022-11-09 13:35:40 +000031 errorprone: {
Alan Stokes36a58d92022-11-09 13:35:40 +000032 enabled: true,
33 javacflags: [
Nikita Ioffe0ef49382022-11-18 14:28:08 +000034 // We use @GuardedBy and we want a test failure if our locking isn't consistent with it.
Alan Stokes36a58d92022-11-09 13:35:40 +000035 "-Xep:GuardedBy:ERROR",
36 ],
37 },
Nikita Ioffef28eec22022-10-18 23:17:34 +010038
Nikita Ioffe30b50e62022-11-15 11:27:45 +000039 sdk_version: "core_platform",
Nikita Ioffe69d297a2022-11-21 12:32:05 +000040 stub_only_libs: [
41 "android_module_lib_stubs_current",
42 ],
Nikita Ioffe30b50e62022-11-15 11:27:45 +000043 impl_only_libs: [
44 "framework",
45 ],
46 impl_library_visibility: [
Nikita Ioffe0ef49382022-11-18 14:28:08 +000047 "//packages/modules/Virtualization:__subpackages__",
Nikita Ioffe30b50e62022-11-15 11:27:45 +000048 ],
Mårten Kongstad98ceaa32024-06-25 10:43:43 +020049 lint: {
Mårten Kongstad3b524ce2024-06-17 17:19:00 +020050 baseline_filename: "lint-baseline.xml",
Mårten Kongstad98ceaa32024-06-25 10:43:43 +020051 warning_checks: [
52 "FlaggedApi",
53 ],
54 },
Nikita Ioffe82a40132024-12-11 16:20:36 +000055 aconfig_declarations: [
56 "avf_aconfig_flags",
57 ],
Alan Stokes34f06882022-08-17 11:38:24 +010058}
Nikita Ioffe9ab470c2024-08-22 14:06:08 +000059
60gensrcs {
61 name: "avf-build-flags-java-gen",
62 srcs: ["src/**/BuildFlags.java_template"],
63 output_extension: "java",
64 cmd: "cp $(in) $(genDir)/tmp.java && " +
65 select(release_flag("RELEASE_AVF_ENABLE_VENDOR_MODULES"), {
66 true: "sed -ie 's/@vendor_modules_enabled_placeholder/true/g'",
67 default: "sed -ie 's/@vendor_modules_enabled_placeholder/false/g'",
68 }) + " $(genDir)/tmp.java && " +
69 " cp $(genDir)/tmp.java $(out)",
70}