+0
−9
+19
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Previously, the logic to add the Metalava command line option `--hide-annotation android.annotation.FlaggedApi` when `SOONG_SDK_SNAPSHOT_HIDE_FLAGGED_APIS=true` was done in `droidstubs.go`. It worked but it turns out that we need to pass more options to Metalava in that situation because while we need to hide most flagged APIs we need to release some flagged APIs whose features are ready. They cannot have the `@FlaggedApi` annotation removed because that would cause the APIs to be released in the next QPR which is not what we want. So, in addition to the above option we will need to pass additional options to Metalava to tell it to keep some flagged APIs. Rather than hard code that in the build, requiring build changes for every new SDK extension release this change uses the argument expansion mechanism in Metalava (treating `@<file>` as if the contents of `<file>` were passed as command line options) to delegate that to ":sdkext-released-flagged-apis". The easiest way to do that was to move the logic to `sdk_library.go` as `droidstub` would do the work of tracking the file dependencies correctly. It also reduces the affect modules to `java_sdk_library` modules rather than all `droidstubs` modules. Bug: 313398274 Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true vendor/google/build/mainline_modules_sdks.sh --build-release=next Change-Id: Ib1cf22f8ef74abc135215537e9311936372eaac7 Merged-In: I4967376c0236bad729398af80fa59b48dbab5f21