summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-05-21 10:21:49 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-05-21 10:21:49 +0000
commita4cf238f4d975ba05cac560d8648eb7d23b92013 (patch)
tree6d65208c58b205f2f6c84bfd02747f3026dee622 /java/systemserver_classpath_fragment.go
parent857d0375662d44f535dcc8fc2bbc14840b0cbadf (diff)
parent8fab6f86af918c37592a51aed09a05e09e1172e9 (diff)
Merge "Populate individual classpath_fragments' classpaths.proto configs."
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go26
1 files changed, 11 insertions, 15 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index a505c6d01..a72b3f60c 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -47,24 +47,19 @@ func (p *platformSystemServerClasspathModule) AndroidMkEntries() (entries []andr
}
func (p *platformSystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- configuredJars := configuredJarListToClasspathJars(ctx, p.ClasspathFragmentToConfiguredJarList(ctx), p.classpathType)
- p.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars)
+ classpathJars := configuredJarListToClasspathJars(ctx, p.ClasspathFragmentToConfiguredJarList(ctx), p.classpathType)
+ p.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, classpathJars)
}
-var platformSystemServerClasspathKey = android.NewOnceKey("platform_systemserverclasspath")
-
func (p *platformSystemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
- return ctx.Config().Once(platformSystemServerClasspathKey, func() interface{} {
- global := dexpreopt.GetGlobalConfig(ctx)
-
- jars := global.SystemServerJars
+ global := dexpreopt.GetGlobalConfig(ctx)
- // 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)
+ 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
}
type SystemServerClasspathModule struct {
@@ -101,7 +96,8 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo
ctx.PropertyErrorf("contents", "empty contents are not allowed")
}
- s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJarListToClasspathJars(ctx, s.ClasspathFragmentToConfiguredJarList(ctx)))
+ classpathJars := configuredJarListToClasspathJars(ctx, s.ClasspathFragmentToConfiguredJarList(ctx), s.classpathType)
+ s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, classpathJars)
}
func (s *SystemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {