Define exportable full api surface stubs
The two major roles of the full api surface stubs (i.e. android_*_stubs_current) are: - Appended to classpath when a module sets sdk_version - Input to generating hiddenapi flags and determine the accessibility of the api at runtime With Trunk Stable, all flagged apis that are not enabled should not be accessible at runtime. In other words, the currently existing full api surface stubs that include both non flagged and flagged apis should not be used to generate the hiddenapi flags. To resolve this problem, this change introduces full api surface stubs of the "exportable" stubs (i.e. non flagged apis + flagged apis enabled by release configuration). The new modules are named similarly to the currently existing full api surface stubs, but appends the "_exportable" prefix to differentiate with the currently existing modules. These modules are solely used for hiddenapi flags generation, and the currently existing modules continue to serve the first aforementioned role. The new modules will toggle between the from-text stubs module and the from-source stubs module when the exportable stubs can be generated from the from-text stubs generating `java_api_library` module. For now, these modules are always built from source. Test: m android_stubs_current_exportable Bug: 317426356 Change-Id: I1f6f738ae9c5ebf151a1554aa1e357ef0092c89c
Loading
Please register or sign in to comment