From 912622f711e45ed7615332431d4d60f139b9c6bc Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 9 Apr 2020 14:16:37 +0100 Subject: Compose the main stubs jars from module stubs This adds stub generation for the non-updatable part of the platform, and changes the full stub jars to be a combination of multiple jars: the stubs of the updatable modules and the stubs of the remaining part of the platform. Composing the stub jars like this allows overriding the individual parts with prebuilts rather than building everything from source. This makes the build safer, as we can make sure that the stub of the apex that is used is also what is used to build the rest of the platform against. The monolithic droidstubs rules remain for now, as it has other functions than generating stub sources (api lint, current.txt, checklast). It remains a goal to get rid of this, but by submitting this CL first it can be done in steps. Bug: 144149403 Test: m android{,_system}_{monolith,merged}_stubs_current Test: m Change-Id: I255486112c03f237aa342cfb93f3b473a2f50470 Merged-In: I255486112c03f237aa342cfb93f3b473a2f50470 (cherry picked from commit 3c1b15a3dea5486b57d3bf1d60a7b7170494274e) --- StubLibraries.bp | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'StubLibraries.bp') diff --git a/StubLibraries.bp b/StubLibraries.bp index b999a10d0a3f..93c5fc346a68 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -309,13 +309,31 @@ java_defaults { } java_library_static { - name: "android_stubs_current", + name: "android_monolith_stubs_current", srcs: [ ":api-stubs-docs" ], defaults: ["android_defaults_stubs_current"], } java_library_static { - name: "android_system_stubs_current", + name: "android_merged_stubs_current", + srcs: [ ":api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-sdkextensions.stubs", + "framework-tethering.stubs", + "updatable_media_stubs.public", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_stubs_current", + static_libs: ["android_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_monolith_stubs_current", srcs: [ ":system-api-stubs-docs" ], defaults: [ "android_defaults_stubs_current", @@ -334,6 +352,24 @@ java_library_static { ], } +java_library_static { + name: "android_system_merged_stubs_current", + srcs: [ ":system-api-stubs-docs-non-updatable" ], + static_libs: [ + "conscrypt.module.public.api.stubs", + "framework-sdkextensions.stubs.system", + "framework-tethering.stubs.system", + "updatable_media_stubs", + ], + defaults: ["android_defaults_stubs_current"], +} + +java_library_static { + name: "android_system_stubs_current", + static_libs: ["android_system_merged_stubs_current"], + defaults: ["android_defaults_stubs_current"], +} + java_library_static { name: "android_test_stubs_current", srcs: [ ":test-api-stubs-docs" ], -- cgit v1.2.3