summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anton Hansson <hansson@google.com> 2022-02-04 15:26:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-02-04 15:26:51 +0000
commit135c992b0e3aa379c0dd27d3afa65a98a9568ec7 (patch)
treedc858a9a65bdd119bc5cd1c8382979d0cab886f2
parent92668918dd51062207b03396d16fc1a777e1ca35 (diff)
parent23274eeff584f346936644f42dac33ebbf954581 (diff)
Merge "Auto-generate list of module impl jars"
-rw-r--r--Android.bp25
-rw-r--r--apex/media/framework/Android.bp2
-rw-r--r--api/api.go27
3 files changed, 26 insertions, 28 deletions
diff --git a/Android.bp b/Android.bp
index 6ae706dad75e..d5d5150886d4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -155,32 +155,9 @@ java_library_with_nonpublic_deps {
name: "framework-all",
installable: false,
static_libs: [
- "android.net.ipsec.ike.impl",
+ "all-framework-module-impl",
"framework-minus-apex",
- "framework-appsearch.impl",
- "framework-connectivity.impl",
- "framework-connectivity-tiramisu.impl",
- "framework-graphics.impl",
- "framework-mediaprovider.impl",
- "framework-permission.impl",
- "framework-permission-s.impl",
- "framework-scheduling.impl",
- "framework-sdkextensions.impl",
- "framework-statsd.impl",
- "framework-supplementalprocess.impl",
- "framework-tethering.impl",
- "framework-uwb.impl",
- "framework-wifi.impl",
- "updatable-media",
],
- soong_config_variables: {
- include_nonpublic_framework_api: {
- static_libs: [
- "framework-auxiliary.impl",
- "framework-supplementalapi.impl",
- ],
- },
- },
apex_available: ["//apex_available:platform"],
sdk_version: "core_platform",
visibility: [
diff --git a/apex/media/framework/Android.bp b/apex/media/framework/Android.bp
index b4edd39894f9..2c2af28c7560 100644
--- a/apex/media/framework/Android.bp
+++ b/apex/media/framework/Android.bp
@@ -66,8 +66,8 @@ java_library {
},
visibility: [
"//frameworks/av/apex:__subpackages__",
- "//frameworks/base", // For framework-all
"//frameworks/base/apex/media/service",
+ "//frameworks/base/api", // For framework-all
],
}
diff --git a/api/api.go b/api/api.go
index 17649e80e81a..5e5f60ee993f 100644
--- a/api/api.go
+++ b/api/api.go
@@ -27,6 +27,7 @@ import (
const art = "art.module.public.api"
const conscrypt = "conscrypt.module.public.api"
const i18n = "i18n.module.public.api"
+var core_libraries_modules = []string{art, conscrypt, i18n}
// 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
@@ -199,9 +200,28 @@ func createMergedSystemStubs(ctx android.LoadHookContext, modules []string) {
ctx.CreateModule(java.LibraryFactory, &props)
}
-func createMergedModuleLibStubs(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.
+ modules = removeAll(modules, core_libraries_modules)
+ // TODO(b/214988855): remove the line below when framework-bluetooth has an impl jar.
+ modules = remove(modules, "framework-bluetooth")
+ props := libraryProps{}
+ props.Name = proptools.StringPtr("all-framework-module-impl")
+ props.Static_libs = transformArray(modules, "", ".impl")
+ // Media module's impl jar is called "updatable-media"
+ for i, v := range props.Static_libs {
+ if v == "framework-media.impl" {
+ props.Static_libs[i] = "updatable-media"
+ }
+ }
+ props.Sdk_version = proptools.StringPtr("module_current")
+ props.Visibility = []string{"//frameworks/base"}
+ ctx.CreateModule(java.LibraryFactory, &props)
+}
+
+func createMergedFrameworkModuleLibStubs(ctx android.LoadHookContext, modules []string) {
// The user of this module compiles against the "core" SDK, so remove core libraries to avoid dupes.
- modules = removeAll(modules, []string{art, conscrypt, i18n})
+ modules = removeAll(modules, core_libraries_modules)
props := libraryProps{}
props.Name = proptools.StringPtr("framework-updatable-stubs-module_libs_api")
props.Static_libs = transformArray(modules, "", ".stubs.module_lib")
@@ -269,7 +289,8 @@ func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) {
createMergedPublicStubs(ctx, bootclasspath)
createMergedSystemStubs(ctx, bootclasspath)
- createMergedModuleLibStubs(ctx, bootclasspath)
+ createMergedFrameworkModuleLibStubs(ctx, bootclasspath)
+ createMergedFrameworkImpl(ctx, bootclasspath)
createMergedAnnotations(ctx, bootclasspath)