aboutsummaryrefslogtreecommitdiff
path: root/rules/apis
diff options
context:
space:
mode:
authorSpandan Das <spandandas@google.com>2023-01-26 20:15:41 +0000
committerSpandan Das <spandandas@google.com>2023-01-31 18:21:28 +0000
commit018ade567c8e21645f36f0c9070f1a395aabac92 (patch)
treedecc3d1b8aab0dc5fe2c58a0e47b18c7a0cf0e10 /rules/apis
parent8a04d2191bf0be9a64929ff5519d4b47933079e4 (diff)
downloadbazel-018ade567c8e21645f36f0c9070f1a395aabac92.tar.gz
Java API export of CorePlatformApi
This API surface is not a proper superset of PublicApi. e.g. consscrypt provides SSLEngines to public's stub jar but not to coreplatform's stub jar. This complexity is not included in API export. The complexity will be handled by the build orchestrator during API assembly (possibly via some hardcoding). (Also updating string representation of system_server to match the one in Soong) Test: b test //build/bazel/rules/apis:api_domain_test_suite Bug: 262014796 Change-Id: I60c80d6b4d716c47024072519c84a7ed200dbc95
Diffstat (limited to 'rules/apis')
-rw-r--r--rules/apis/api_domain_test.bzl4
-rw-r--r--rules/apis/java_api_contribution.bzl12
2 files changed, 12 insertions, 4 deletions
diff --git a/rules/apis/api_domain_test.bzl b/rules/apis/api_domain_test.bzl
index 0a4a2797..147c8400 100644
--- a/rules/apis/api_domain_test.bzl
+++ b/rules/apis/api_domain_test.bzl
@@ -26,7 +26,7 @@ def _json_output_test_impl(ctx):
actions = analysistest.target_actions(env)
asserts.equals(
env,
- expected = 8, # union of cc and java api surfaces
+ expected = 9, # union of cc and java api surfaces
actual = len(actions),
)
asserts.equals(
@@ -64,7 +64,7 @@ def _json_output_contains_contributions_test_impl(ctx):
actions = analysistest.target_actions(env)
asserts.equals(
env,
- expected = 8, # union of cc and java api surfaces
+ expected = 9, # union of cc and java api surfaces
actual = len(actions),
)
diff --git a/rules/apis/java_api_contribution.bzl b/rules/apis/java_api_contribution.bzl
index 45c9fa6e..7724cdca 100644
--- a/rules/apis/java_api_contribution.bzl
+++ b/rules/apis/java_api_contribution.bzl
@@ -29,8 +29,9 @@ _PUBLIC_API = "publicapi"
_SYSTEM_API = "systemapi"
_TEST_API = "testapi"
_MODULE_LIB_API = "module-libapi"
-_SYSTEM_SERVER_API = "systemserver-api"
+_SYSTEM_SERVER_API = "system-serverapi"
_INTRA_CORE_API = "intracoreapi"
+_CORE_PLATFORM_API = "core_platformapi"
# _TOOLCHAIN_API is a special API surface provided by ART to compile other API domains
# (e.g. core-lambda-stubs required to compile java files containing lambdas)
@@ -52,7 +53,14 @@ _JAVA_FULLAPISURFACE_TO_PARTIALSIGNATUREFILE = {
# [<hide>, --show-single-annotation libcore.api.IntraCoreApi"]
# conscrypt and icu4j use similar droidoc_options
_INTRA_CORE_API: [_PUBLIC_API, _INTRA_CORE_API],
- # TODO: Handle CorePlatformApi
+ # CorePlatformApi does not extend PublicApi
+ # Each core module is at different stages of transition
+ # The status quo in Soong today is
+ # 1. conscrypt - Still provides CorePlatformApis
+ # 2. i18n - APIs have migrated to Public API surface
+ # 3. art - APIs have migrated to ModuleLib API suface
+ # This layering complexity will be handled by the build orchestrator and not by API export.
+ _CORE_PLATFORM_API: [_CORE_PLATFORM_API],
# coreapi does not have an entry here, it really is the public stubs of the 3 core modules
# (art, conscrypt, i18n)
_TOOLCHAIN_API: [_TOOLCHAIN_API],