From 28cb328d86d9907191dc29b387d4ef8990e4bca7 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 13 Jul 2022 11:18:47 +0000 Subject: Dedup *fragments information common to apex and sdk Previously, both the sdk and apex had to specify the same *fragments property to ensure that building a system image from a prebuilt version of the module (both APEX and sdk snapshots) would work. This change avoids the duplication by adding the apex to the sdk which allows the sdk to automatically export any APIs and related information provided by the APEX. At the moment that just includes information from *fragments properties but may expand in future. Bug: 232401814 Test: # Build snapshots with a fixed build number BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh # Remove api diff files as they contain file stamps of generated files so # differ every time they are generated. find out/dist/mainline-sdks -name \*txt | xargs rm # Save the snapshots away. mv out/dist/mainline-sdks before-changes # Apply this change. # Repeat the first two steps above and then run the following to verify # that this change had no effect on the generated snapshot contents. meld before-changes out/dist/mainline-sdks Change-Id: Ic61c043e49f7de9560659359b67ed6ed0317ee08 --- Android.bp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Android.bp') diff --git a/Android.bp b/Android.bp index 3856a57b0..66f2a0c67 100644 --- a/Android.bp +++ b/Android.bp @@ -54,8 +54,11 @@ filegroup { sdk { name: "permission-module-sdk", - bootclasspath_fragments: ["com.android.permission-bootclasspath-fragment"], - systemserverclasspath_fragments: ["com.android.permission-systemserverclasspath-fragment"], + apexes: [ + // Adds exportable dependencies of the APEX to the sdk, + // e.g. *classpath_fragments. + "com.android.permission", + ], } // Encapsulate the contributions made by the com.android.permission to the bootclasspath. -- cgit v1.2.3-59-g8ed1b