Create java_defaults in api.go
combined_apis.bootclasspath lists java_sdk_library modules that
contribute to API surfaces. The api_contribution modules generated from
these sdk_library modules (more specifically, from droidstubs module
created from the sdk_library module) are used to generate full api
surface java_api_library modules. Currently, the java_defaults modules
are hardcoded, but this leads to a duplicate source of truth, adding
difficulty in scaling the api domains that contributes to api surfaces.
Generating the java_defaults dynamically in combined_apis instead of
hardcoding resolves this problem, as well as the discrepancy in the list
of api contributions in aosp and internal master.
Test: m android_<API_SURFACE_NAME>_stubs_current.from-text
Bug: 277378670
Change-Id: I987c2c1d89535d2347cf14d084c9c9a47e1db5e0
1 file changed