Hacky workaround for half-finalized builds.

Metalava increments the SDK level by one when it's not "REL", so we
temporarily force the build to be "REL" while we're still in the
process of finalizing it.

This CL must be reverted as part of actually declaring "REL".

Bug: 171506470
Test: Build
(cherry picked from commit 05597c0cc4)

Change-Id: I18405cdd27769598f5e7a6a968f0dd473f936f6c
This commit is contained in:
Jeff Sharkey 2021-06-01 12:12:31 -06:00 committed by Anton Hansson
parent 8823526801
commit 50493f0797

View file

@ -379,7 +379,8 @@ func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *a
cmd.FlagWithOutput("--generate-api-levels ", d.apiVersionsXml)
cmd.FlagWithInput("--apply-api-levels ", d.apiVersionsXml)
cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String())
cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
// STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD
// cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
filename := proptools.StringDefault(d.properties.Api_levels_jar_filename, "android.jar")