Pave the way for external mainline module API annotations.
This change prepares for adding mainline mode API annotations
(@CorePlatformApi etc.) supplied in external .annotated.java files so
they are not carried as patches in ojluni source files.
No real annotations are introduced in this change, and it has no
effect on the generated stubs for any of the affected targets (except,
seemingly, a few trivial whitespace changes).
Specifically, this change does the following:
- Adds a placeholder .annotated.java file (to be removed as soon as we
have any real ones).
- Adds a @libcore.api.Hide annotation we can use as an alternative to
the @hide javadoc tag.
- Changes the relevant mainline module API droidstubs rules to merge
in the .annotated.java annotations and to respect the @Hide
annotation.
- Refactors the openjdk_java_files targets to create a new category of
source file, those which are annotated for the mainline module APIs
but are not part of the public API. (The alternative to doing this
would be to move them into the public category and change all the
public API droidstubs to merge in the .annotated.java annotations
and to respect @Hide, which would be significantly more invasive.)
- Changes the relevant mainline module API droidstubs rules use the
new source categories.
Bug: 115746226
Test: `make core-platform-api-stubs core-intra-stubs core-libart+oj-intra-stubs`
Change-Id: I33e80603686112d3eb5a05debb58f13764b819b6
8 files changed