Baklava finalization special
Internally metalava bumps the provided current-version by +1
unless current-codename is set to exactly "REL". As we're half way
through finalization work the SDK value has been bumped to 36, which is
the real value for Baklava, but as the codename is yet to be set to
"REL", we end up with the incorrect version being used by metalava as it
produces 37 from 36 + 1
Ignore-AOSP-First: Baklava Finalization
Test: vendor/google/build/mainline_modules_x86_64.sh (with
RELEASE_PLATFORM_SDK_VERSION set to 36)
Bug: 376680864
Bug: 379105862
Bug: 392959069
Change-Id: I805337df0ef89bbb85ac8fd349c573b4c3928941
diff --git a/java/droidstubs.go b/java/droidstubs.go
index e0c2e63..009e102 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -555,7 +555,9 @@
}
if apiVersions != nil {
cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String())
- cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
+ if ctx.Config().PlatformSdkVersion().String() != "36" || ctx.Config().PlatformSdkCodename() != "Baklava" {
+ cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
+ }
cmd.FlagWithInput("--apply-api-levels ", apiVersions)
}
}