Merge "Enable from-source vs from-text toggling for core.module_lib.stubs." into main

This commit is contained in:
Romain Jobredeaux 2023-07-31 13:19:25 +00:00 committed by Gerrit Code Review
commit 6553cf54fb
2 changed files with 45 additions and 13 deletions

View file

@ -146,12 +146,43 @@ java_system_modules {
],
}
java_defaults {
name: "core.module_lib.stubs.defaults",
visibility: ["//visibility:private"],
sdk_version: "none",
system_modules: "none",
}
// A stubs target containing the parts of the public SDK & @SystemApi(MODULE_LIBRARIES) API
// provided by the core libraries.
//
// Don't use this directly, use "sdk_version: module_current".
java_library {
name: "core.module_lib.stubs",
defaults: [
"core.module_lib.stubs.defaults",
],
static_libs: [
"core.module_lib.stubs.from-source",
],
product_variables: {
build_from_text_stub: {
static_libs: [
"core.module_lib.stubs.from-text",
],
exclude_static_libs: [
"core.module_lib.stubs.from-source",
],
},
},
}
java_library {
name: "core.module_lib.stubs.from-source",
defaults: [
"core.module_lib.stubs.defaults",
],
static_libs: [
"art.module.public.api.stubs.module_lib",
@ -161,9 +192,6 @@ java_library {
"conscrypt.module.public.api.stubs",
"i18n.module.public.api.stubs",
],
sdk_version: "none",
system_modules: "none",
visibility: ["//visibility:private"],
}
// Produces a dist file that is used by the
@ -249,10 +277,10 @@ java_library {
product_variables: {
build_from_text_stub: {
static_libs: [
"stable.core.platform.api.stubs.from-text",
"legacy.core.platform.api.stubs.from-text",
],
exclude_static_libs: [
"stable.core.platform.api.stubs.from-source",
"legacy.core.platform.api.stubs.from-source",
],
},
},

View file

@ -57,19 +57,23 @@ java_library {
],
}
java_library {
java_api_library {
name: "core.module_lib.stubs.from-text",
static_libs: [
"art.module.public.api.stubs.module_lib.from-text",
api_surface: "module-lib",
api_contributions: [
"art.module.public.api.stubs.source.api.contribution",
"art.module.public.api.stubs.source.system.api.contribution",
"art.module.public.api.stubs.source.module_lib.api.contribution",
// Replace the following with the module-lib correspondence when Conscrypt or i18N module
// Add the module-lib correspondence when Conscrypt or i18N module
// provides @SystemApi(MODULE_LIBRARIES). Currently, assume that only ART module provides
// @SystemApi(MODULE_LIBRARIES).
"conscrypt.module.public.api.stubs.from-text",
"i18n.module.public.api.stubs.from-text",
"conscrypt.module.public.api.stubs.source.api.contribution",
"i18n.module.public.api.stubs.source.api.contribution",
],
libs: [
"stub-annotations",
],
sdk_version: "none",
system_modules: "none",
visibility: ["//visibility:private"],
}