Enable exportable stubs to include READ_WRITE aconfig flagged apis
Currently in SDK build, "exportable" stubs are used to generate the android.jar and the corresponding build artifacts, as well as the hiddenapi flags. "exportable" stubs only include the flagged apis that are "enabled" and "read only", and exclude all other flagged apis. This will be replaced with "runtime" stubs in the long run, which include "read_write" flagged apis on top of the "enabled" and "read only" flags. Prior to Trunk Stable, the SDK build did not distinguish the target audience of the SDK. That is, the identical build target was used to generate the SDK targeted toward the Google3 developers (i.e. Google3 SDK drop) and the SDK targeted toward the public (i.e. Developer Preview). However, given that we now have "experimental" apis with Trunk Stable, there are demands to differentiate the SDK based on the target audience, so that the "experimental" APIs are included in the SDK targeted toward Google3 while they are excluded in the public facing SDK. The long term solution to achieve this is to generate the hiddenapi flags and (conditionally) the SDKs using the runtime stubs. However, as this is high priority, this change resolves the problem by modifying the filter condition of the "exportable" stubs to include the "read_write" flagged apis on top of the "enabled" and "read only" flagged apis when the value of the default-false build flag "RELEASE_EXPORT_RUNTIME_APIS" is set to true. Note that this is a temporary solution; However, we might need to keep the "RELEASE_EXPORT_RUNTIME_APIS" build flag even in the long run to determine what set of apis are included in the generated SDK, based on the target audience of the SDK. Test: m nothing --no-skip-soong-tests Bug: 323188988 Change-Id: If0d5fa74b3ba6f4a57c86aade8d340f149a657a2
Loading
Please register or sign in to comment