Merge changes I8d060594,I2b6a57ae into main

* changes:
  Put extraCombinedJars after the compiled jars
  Use RSP file for long classpaths
This commit is contained in:
Colin Cross
2024-02-29 18:46:46 +00:00
committed by Gerrit Code Review
3 changed files with 57 additions and 14 deletions

View File

@@ -1307,7 +1307,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
}
}
jars := append(android.Paths(nil), kotlinJars...)
jars := slices.Clone(kotlinJars)
j.compiledSrcJars = srcJars
@@ -1322,7 +1322,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() {
@@ -1396,6 +1396,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
@@ -1482,8 +1484,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