Loading api/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -109,6 +109,7 @@ combined_apis { "framework-sdksandbox", "framework-sdksandbox", "framework-tethering", "framework-tethering", "framework-uwb", "framework-uwb", "framework-virtualization", "framework-wifi", "framework-wifi", "i18n.module.public.api", "i18n.module.public.api", ], ], Loading api/api.go +33 −6 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,16 @@ import ( const art = "art.module.public.api" const art = "art.module.public.api" const conscrypt = "conscrypt.module.public.api" const conscrypt = "conscrypt.module.public.api" const i18n = "i18n.module.public.api" const i18n = "i18n.module.public.api" const virtualization = "framework-virtualization" var core_libraries_modules = []string{art, conscrypt, i18n} var core_libraries_modules = []string{art, conscrypt, i18n} // List of modules that are not yet updatable, and hence they can still compile // against hidden APIs. These modules are filtered out when building the // updatable-framework-module-impl (because updatable-framework-module-impl is // built against module_current SDK). Instead they are directly statically // linked into the all-framework-module-lib, which is building against hidden // APIs. var non_updatable_modules = []string{virtualization} // The intention behind this soong plugin is to generate a number of "merged" // The intention behind this soong plugin is to generate a number of "merged" // API-related modules that would otherwise require a large amount of very // API-related modules that would otherwise require a large amount of very Loading Loading @@ -249,14 +257,33 @@ func createMergedSystemStubs(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { // This module is for the "framework-all" module, which should not include the core libraries. // This module is for the "framework-all" module, which should not include the core libraries. modules = removeAll(modules, core_libraries_modules) modules = removeAll(modules, core_libraries_modules) // Remove the modules that belong to non-updatable APEXes since those are allowed to compile // against unstable APIs. modules = removeAll(modules, non_updatable_modules) // First create updatable-framework-module-impl, which contains all updatable modules. // This module compiles against module_lib SDK. { props := libraryProps{} props := libraryProps{} props.Name = proptools.StringPtr("all-framework-module-impl") props.Name = proptools.StringPtr("updatable-framework-module-impl") props.Static_libs = transformArray(modules, "", ".impl") props.Static_libs = transformArray(modules, "", ".impl") props.Sdk_version = proptools.StringPtr("module_current") props.Sdk_version = proptools.StringPtr("module_current") props.Visibility = []string{"//frameworks/base"} props.Visibility = []string{"//frameworks/base"} ctx.CreateModule(java.LibraryFactory, &props) ctx.CreateModule(java.LibraryFactory, &props) } } // Now create all-framework-module-impl, which contains updatable-framework-module-impl // and all non-updatable modules. This module compiles against hidden APIs. { props := libraryProps{} props.Name = proptools.StringPtr("all-framework-module-impl") props.Static_libs = transformArray(non_updatable_modules, "", ".impl") props.Static_libs = append(props.Static_libs, "updatable-framework-module-impl") props.Sdk_version = proptools.StringPtr("core_platform") props.Visibility = []string{"//frameworks/base"} ctx.CreateModule(java.LibraryFactory, &props) } } func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) { // The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes. // The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes. modules = removeAll(modules, core_libraries_modules) modules = removeAll(modules, core_libraries_modules) Loading Loading
api/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -109,6 +109,7 @@ combined_apis { "framework-sdksandbox", "framework-sdksandbox", "framework-tethering", "framework-tethering", "framework-uwb", "framework-uwb", "framework-virtualization", "framework-wifi", "framework-wifi", "i18n.module.public.api", "i18n.module.public.api", ], ], Loading
api/api.go +33 −6 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,16 @@ import ( const art = "art.module.public.api" const art = "art.module.public.api" const conscrypt = "conscrypt.module.public.api" const conscrypt = "conscrypt.module.public.api" const i18n = "i18n.module.public.api" const i18n = "i18n.module.public.api" const virtualization = "framework-virtualization" var core_libraries_modules = []string{art, conscrypt, i18n} var core_libraries_modules = []string{art, conscrypt, i18n} // List of modules that are not yet updatable, and hence they can still compile // against hidden APIs. These modules are filtered out when building the // updatable-framework-module-impl (because updatable-framework-module-impl is // built against module_current SDK). Instead they are directly statically // linked into the all-framework-module-lib, which is building against hidden // APIs. var non_updatable_modules = []string{virtualization} // The intention behind this soong plugin is to generate a number of "merged" // The intention behind this soong plugin is to generate a number of "merged" // API-related modules that would otherwise require a large amount of very // API-related modules that would otherwise require a large amount of very Loading Loading @@ -249,14 +257,33 @@ func createMergedSystemStubs(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { // This module is for the "framework-all" module, which should not include the core libraries. // This module is for the "framework-all" module, which should not include the core libraries. modules = removeAll(modules, core_libraries_modules) modules = removeAll(modules, core_libraries_modules) // Remove the modules that belong to non-updatable APEXes since those are allowed to compile // against unstable APIs. modules = removeAll(modules, non_updatable_modules) // First create updatable-framework-module-impl, which contains all updatable modules. // This module compiles against module_lib SDK. { props := libraryProps{} props := libraryProps{} props.Name = proptools.StringPtr("all-framework-module-impl") props.Name = proptools.StringPtr("updatable-framework-module-impl") props.Static_libs = transformArray(modules, "", ".impl") props.Static_libs = transformArray(modules, "", ".impl") props.Sdk_version = proptools.StringPtr("module_current") props.Sdk_version = proptools.StringPtr("module_current") props.Visibility = []string{"//frameworks/base"} props.Visibility = []string{"//frameworks/base"} ctx.CreateModule(java.LibraryFactory, &props) ctx.CreateModule(java.LibraryFactory, &props) } } // Now create all-framework-module-impl, which contains updatable-framework-module-impl // and all non-updatable modules. This module compiles against hidden APIs. { props := libraryProps{} props.Name = proptools.StringPtr("all-framework-module-impl") props.Static_libs = transformArray(non_updatable_modules, "", ".impl") props.Static_libs = append(props.Static_libs, "updatable-framework-module-impl") props.Sdk_version = proptools.StringPtr("core_platform") props.Visibility = []string{"//frameworks/base"} ctx.CreateModule(java.LibraryFactory, &props) } } func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) { func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) { // The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes. // The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes. modules = removeAll(modules, core_libraries_modules) modules = removeAll(modules, core_libraries_modules) Loading