Strip module-info.class files when combining jars
am: 7b60cdd6e5
Change-Id: I3385a72716142df0047f7f99bf3270808e7ae7e2
This commit is contained in:
@@ -383,6 +383,10 @@ func TransformJarsToJar(ctx android.ModuleContext, outputFile android.WritablePa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove any module-info.class files that may have come from prebuilt jars, they cause problems
|
||||||
|
// for downstream tools like desugar.
|
||||||
|
jarArgs = append(jarArgs, "-stripFile module-info.class")
|
||||||
|
|
||||||
if stripDirs {
|
if stripDirs {
|
||||||
jarArgs = append(jarArgs, "-D")
|
jarArgs = append(jarArgs, "-D")
|
||||||
}
|
}
|
||||||
|
@@ -781,6 +781,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
|
|||||||
|
|
||||||
if len(jars) == 1 && !manifest.Valid() {
|
if len(jars) == 1 && !manifest.Valid() {
|
||||||
// Optimization: skip the combine step if there is nothing to do
|
// Optimization: skip the combine step if there is nothing to do
|
||||||
|
// TODO(ccross): this leaves any module-info.class files, but those should only come from
|
||||||
|
// prebuilt dependencies until we support modules in the platform build, so there shouldn't be
|
||||||
|
// any if len(jars) == 1.
|
||||||
outputFile = jars[0]
|
outputFile = jars[0]
|
||||||
} else {
|
} else {
|
||||||
combinedJar := android.PathForModuleOut(ctx, "combined", jarName)
|
combinedJar := android.PathForModuleOut(ctx, "combined", jarName)
|
||||||
|
Reference in New Issue
Block a user