Use file glob for zipping classes*.dex files
Using a directory to zip the output of d8 and r8 was causing the empty classes.dex.jar file in the output directory to get zipped in. Use a file glob instead so that it only picks up the classes*.dex files even if classes.dex.jar already exists. Test: m checkbuild Change-Id: I1f3c1cbc23439fc52756aad027ab8cac10213d1d
This commit is contained in:
@@ -26,7 +26,7 @@ var d8 = pctx.AndroidStaticRule("d8",
|
|||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` +
|
||||||
`${config.D8Cmd} --output $outDir $d8Flags $in && ` +
|
`${config.D8Cmd} --output $outDir $d8Flags $in && ` +
|
||||||
`${config.SoongZipCmd} -o $outDir/classes.dex.jar -C $outDir -D $outDir && ` +
|
`${config.SoongZipCmd} -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` +
|
||||||
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
"${config.D8Cmd}",
|
"${config.D8Cmd}",
|
||||||
@@ -46,7 +46,7 @@ var r8 = pctx.AndroidStaticRule("r8",
|
|||||||
`-printmapping $outDict ` +
|
`-printmapping $outDict ` +
|
||||||
`$r8Flags && ` +
|
`$r8Flags && ` +
|
||||||
`touch "$outDict" && ` +
|
`touch "$outDict" && ` +
|
||||||
`${config.SoongZipCmd} -o $outDir/classes.dex.jar -C $outDir -D $outDir && ` +
|
`${config.SoongZipCmd} -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` +
|
||||||
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
`${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
"${config.R8Cmd}",
|
"${config.R8Cmd}",
|
||||||
|
Reference in New Issue
Block a user