platform_build/tools/finalization/build_soong_java_droidstubs.go.apply_hack.diff
Alex Buynytskyy bdcef7bfb8 Refresh the latest script versions + preparation for local mode.
Bug: 260755259
Test: local run
Change-Id: I45d3651bd4b837e1338535f98d7256ca9b47e089
2023-02-21 04:56:37 +00:00

30 lines
1 KiB
Diff

From 12eea1512f2612f41b5cf7004ee2e6a189d548d7 Mon Sep 17 00:00:00 2001
From: Alex Buynytskyy <alexbuy@google.com>
Date: Thu, 01 Sep 2022 10:44:21 -0700
Subject: [PATCH] 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: none
Test: Build
Change-Id: I8c24c6dabec0270bc384d8465c582a4ddbe8bd6c
---
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 5777b18..ec4a0f4 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -386,7 +386,8 @@
}
if apiVersions != nil {
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())
cmd.FlagWithInput("--apply-api-levels ", apiVersions)
}
}