From f13fd59f550e972ce0494750f01140eb7231bb1a Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 9 Apr 2024 09:54:23 -0700 Subject: [PATCH] Update api_levels.go instead of api_constants.bzl This is a revert of aosp/2573034, but as a separate cl because the filename has been changed. We're reverting aosp/2573034 because the bazel migration has been cancelled and that api_constants.bzl file was changed to not be used. Ignore-AOSP-First: Someone else renamed this file in internal-only. Bug: 315353489 Test: Manually ran this snippet of shell script Change-Id: I3a51be1119109d2a6cf3959bdc8a48192872580f --- tools/finalization/finalize-sdk-resources.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/finalization/finalize-sdk-resources.sh b/tools/finalization/finalize-sdk-resources.sh index 003b7c04c9..10266ed1da 100755 --- a/tools/finalization/finalize-sdk-resources.sh +++ b/tools/finalization/finalize-sdk-resources.sh @@ -120,10 +120,10 @@ function finalize_sdk_resources() { local build_tools_source="$top/development/sdk/build_tools_source.prop_template" sed -i -e 's/Pkg\.Revision.*/Pkg\.Revision=${PLATFORM_SDK_VERSION}.0.0/g' $build_tools_source - # build/bazel - local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}" - if ! grep -q "$codename_version" "$top/build/bazel/rules/common/api_constants.bzl" ; then - sed -i -e "/:.*$((${FINAL_PLATFORM_SDK_VERSION}-1)),/a \\ $codename_version," "$top/build/bazel/rules/common/api_constants.bzl" + # build/soong + local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}" + if ! grep -q "$codename_version" "$top/build/soong/android/api_levels.go" ; then + sed -i -e "/:.*$((${FINAL_PLATFORM_SDK_VERSION}-1)),/a \\\t\t$codename_version," "$top/build/soong/android/api_levels.go" fi # cts