summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-05-07 19:41:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-05-07 19:41:08 +0000
commitee7e359131b4f427ca0085f78a31dac22697d40c (patch)
tree1184d18bf84626d41ce0839d6afee04a4827336e /java/systemserver_classpath_fragment.go
parent3b755d4560d2d12b91d9648a0061e2467b120116 (diff)
parent013485bd832075821f01a2a737b14647baab3835 (diff)
Merge "Declare ConfiguredJarList in specific fragment implementations."
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 3f8a0836f..82cdb8926 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -16,6 +16,7 @@ package java
import (
"android/soong/android"
+ "android/soong/dexpreopt"
)
func init() {
@@ -45,6 +46,22 @@ func (b *platformSystemServerClasspathModule) AndroidMkEntries() (entries []andr
}
func (b *platformSystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- // TODO(satayev): split apex jars into separate configs.
- b.classpathFragmentBase().generateClasspathProtoBuildActions(ctx)
+ configuredJars := configuredJarListToClasspathJars(ctx, b.ClasspathFragmentToConfiguredJarList(ctx), b.classpathType)
+ b.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars)
+}
+
+var platformSystemServerClasspathKey = android.NewOnceKey("platform_systemserverclasspath")
+
+func (b *platformSystemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
+ return ctx.Config().Once(platformSystemServerClasspathKey, func() interface{} {
+ global := dexpreopt.GetGlobalConfig(ctx)
+
+ jars := global.SystemServerJars
+
+ // TODO(satayev): split apex jars into separate configs.
+ for i := 0; i < global.UpdatableSystemServerJars.Len(); i++ {
+ jars = jars.Append(global.UpdatableSystemServerJars.Apex(i), global.UpdatableSystemServerJars.Jar(i))
+ }
+ return jars
+ }).(android.ConfiguredJarList)
}