Merge "Fix check-boot-jars when a boot jar is provided by prebuilt" am: 0e63a8e761 am: ac2a42054f

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1341756

Change-Id: Ife514f78e7aea0b8ed05f74c21d3ce95054796cc
This commit is contained in:
Anton Hansson
2020-06-17 20:02:20 +00:00
committed by Automerger Merge Worker
4 changed files with 31 additions and 4 deletions

View File

@@ -1687,7 +1687,9 @@ type javaDependency interface {
func apexFileForJavaLibrary(ctx android.BaseModuleContext, lib javaDependency, module android.Module) apexFile {
dirInApex := "javalib"
fileToCopy := lib.DexJarBuildPath()
af := newApexFile(ctx, fileToCopy, module.Name(), dirInApex, javaSharedLib, module)
// Remove prebuilt_ if necessary so the source and prebuilt modules have the same name.
name := strings.TrimPrefix(module.Name(), "prebuilt_")
af := newApexFile(ctx, fileToCopy, name, dirInApex, javaSharedLib, module)
af.jacocoReportClassesFile = lib.JacocoReportClassesFile()
af.stem = lib.Stem() + ".jar"
return af