Merge changes I8d060594,I2b6a57ae into main am: 5d55b66861 am: 8b64ad9506

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

Change-Id: I3aa663741d26491ffeb10cc2fb2c97a3a83c46be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Colin Cross
2024-02-29 20:36:23 +00:00
committed by Automerger Merge Worker
3 changed files with 57 additions and 14 deletions

View File

@@ -1312,7 +1312,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
}
}
jars := append(android.Paths(nil), kotlinJars...)
jars := slices.Clone(kotlinJars)
j.compiledSrcJars = srcJars
@@ -1327,7 +1327,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
// allow for the use of annotation processors that do function correctly
// with sharding enabled. See: b/77284273.
}
extraJars := append(android.CopyOf(extraCombinedJars), kotlinHeaderJars...)
extraJars := append(slices.Clone(kotlinHeaderJars), extraCombinedJars...)
headerJarFileWithoutDepsOrJarjar, j.headerJarFile, j.repackagedHeaderJarFile =
j.compileJavaHeader(ctx, uniqueJavaFiles, srcJars, deps, flags, jarName, extraJars)
if ctx.Failed() {
@@ -1401,6 +1401,8 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
}
}
jars = append(jars, extraCombinedJars...)
j.srcJarArgs, j.srcJarDeps = resourcePathsToJarArgs(srcFiles), srcFiles
var includeSrcJar android.WritablePath
@@ -1487,8 +1489,6 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
jars = append(jars, servicesJar)
}
jars = append(android.CopyOf(extraCombinedJars), jars...)
// Combine the classes built from sources, any manifests, and any static libraries into
// classes.jar. If there is only one input jar this step will be skipped.
var outputFile android.OutputPath