diff options
Diffstat (limited to 'java')
| -rw-r--r-- | java/OWNERS | 2 | ||||
| -rw-r--r-- | java/dexpreopt_config.go | 24 | ||||
| -rw-r--r-- | java/java.go | 4 |
3 files changed, 19 insertions, 11 deletions
diff --git a/java/OWNERS b/java/OWNERS index d68a5b0f3..16ef4d812 100644 --- a/java/OWNERS +++ b/java/OWNERS @@ -1 +1 @@ -per-file dexpreopt.go = ngeoffray@google.com,calin@google.com,mathieuc@google.com +per-file dexpreopt*.go = ngeoffray@google.com,calin@google.com,mathieuc@google.com diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go index b30bd0091..a0b1ea599 100644 --- a/java/dexpreopt_config.go +++ b/java/dexpreopt_config.go @@ -138,21 +138,29 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { global := dexpreoptGlobalConfig(ctx) runtimeModules := global.RuntimeApexJars + nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules) + frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules) + imageModules := concat(runtimeModules, frameworkModules) - var runtimeBootLocations []string + var bootLocations []string for _, m := range runtimeModules { - runtimeBootLocations = append(runtimeBootLocations, + bootLocations = append(bootLocations, filepath.Join("/apex/com.android.runtime/javalib", m+".jar")) } + for _, m := range frameworkModules { + bootLocations = append(bootLocations, + filepath.Join("/system/framework", m+".jar")) + } + // The path to bootclasspath dex files needs to be known at module GenerateAndroidBuildAction time, before // the bootclasspath modules have been compiled. Set up known paths for them, the singleton rules will copy // them there. // TODO: use module dependencies instead - var runtimeBootDexPaths android.WritablePaths - for _, m := range runtimeModules { - runtimeBootDexPaths = append(runtimeBootDexPaths, + var bootDexPaths android.WritablePaths + for _, m := range imageModules { + bootDexPaths = append(bootDexPaths, android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_apexjars_input", m+".jar")) } @@ -167,9 +175,9 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { return bootImageConfig{ name: "apex", - modules: runtimeModules, - dexLocations: runtimeBootLocations, - dexPaths: runtimeBootDexPaths, + modules: imageModules, + dexLocations: bootLocations, + dexPaths: bootDexPaths, dir: dir, symbolsDir: symbolsDir, images: images, diff --git a/java/java.go b/java/java.go index 6168b38d4..47dd95724 100644 --- a/java/java.go +++ b/java/java.go @@ -1253,9 +1253,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path // merge implementation jar with resources if necessary implementationAndResourcesJar := outputFile if j.resourceJar != nil { - jars := android.Paths{implementationAndResourcesJar, j.resourceJar} + jars := android.Paths{j.resourceJar, implementationAndResourcesJar} combinedJar := android.PathForModuleOut(ctx, "withres", jarName) - TransformJarsToJar(ctx, combinedJar, "for resources", jars, android.OptionalPath{}, + TransformJarsToJar(ctx, combinedJar, "for resources", jars, manifest, false, nil, nil) implementationAndResourcesJar = combinedJar } |