From 0c101db579005a740cf4fab647e89a0c22ff568a Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Tue, 14 Mar 2023 07:03:46 +0000 Subject: [PATCH] Add java_api_library equivalence of android-non-updatable.stubs Currently, android-non-updatable.stubs modules, which have dependencies on from-source creating droidstubs modules, are on the ninja critical path during from-text stub build. This change creates a from-text stub generating java_api_library equivalence of the modules. Test: m android-non-updatable.stubs.from-text \ android-non-updatable.stubs.system.from-text \ android-non-updatable.stubs.test.from-text \ android-non-updatable.stubs.module_lib.from-text Bug: 273403800 Change-Id: If593d3b65a6d62484749cc3085c9333e44431248 --- api/StubLibraries.bp | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp index f08745b5cd2c2..4e8bc7cfabf4d 100644 --- a/api/StubLibraries.bp +++ b/api/StubLibraries.bp @@ -282,6 +282,57 @@ java_library { }, } +java_defaults { + name: "non_updatable_api_library_defaults", + static_libs: ["framework-res-package-jar"], + libs: ["stub-annotations"], +} + +java_api_library { + name: "android-non-updatable.stubs.from-text", + api_surface: "public", + api_files: [ + ":non-updatable-current.txt", + ], + defaults: ["non_updatable_api_library_defaults"], + dep_api_srcs: "android_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.system.from-text", + api_surface: "system", + api_files: [ + ":non-updatable-current.txt", + ":non-updatable-system-current.txt", + ], + defaults: ["non_updatable_api_library_defaults"], + dep_api_srcs: "android_system_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.test.from-text", + api_surface: "test", + api_files: [ + ":non-updatable-current.txt", + ":non-updatable-system-current.txt", + ":non-updatable-test-current.txt", + ], + defaults: ["non_updatable_api_library_defaults"], + dep_api_srcs: "android_test_stubs_current.from-text", +} + +java_api_library { + name: "android-non-updatable.stubs.module_lib.from-text", + api_surface: "module_lib", + api_files: [ + ":non-updatable-current.txt", + ":non-updatable-system-current.txt", + ":non-updatable-module-lib-current.txt", + ], + defaults: ["non_updatable_api_library_defaults"], + dep_api_srcs: "android_module_lib_stubs_current_full.from-text", +} + java_defaults { name: "android_stubs_dists_default", dist: {