In trunk stable, the ABI dumps in "current" directory are not what we intend to finalize. They need to be removed. The step will be replaced with a command that builds ABI dumps. Ignore-AOSP-First: merge conflict Test: build/make/tools/finalization/finalize-sdk-rel.sh Bug: 333532038 Change-Id: I08896b637b34861e73cff4d829941d9fb5c56475
41 lines
1.6 KiB
Bash
Executable File
41 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
function revert_droidstubs_hack() {
|
|
if grep -q 'STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD' "$top/build/soong/java/droidstubs.go" ; then
|
|
patch --strip=1 --no-backup-if-mismatch --directory="$top/build/soong" --input=../../build/make/tools/finalization/build_soong_java_droidstubs.go.revert_hack.diff
|
|
fi
|
|
}
|
|
|
|
function apply_prerelease_sdk_hack() {
|
|
if ! grep -q 'STOPSHIP: hack for the pre-release SDK' "$top/frameworks/base/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java" ; then
|
|
patch --strip=1 --no-backup-if-mismatch --directory="$top/frameworks/base" --input=../../build/make/tools/finalization/frameworks_base.apply_hack.diff
|
|
fi
|
|
}
|
|
|
|
function finalize_sdk_rel() {
|
|
local top="$(dirname "$0")"/../../../..
|
|
source $top/build/make/tools/finalization/environment.sh
|
|
|
|
# revert droidstubs hack now we are switching to REL
|
|
revert_droidstubs_hack
|
|
|
|
# let the apps built with pre-release SDK parse
|
|
apply_prerelease_sdk_hack
|
|
|
|
# cts
|
|
if ! grep -q "${FINAL_PLATFORM_VERSION}" "$top/cts/tests/tests/os/assets/platform_versions.txt" ; then
|
|
echo ${FINAL_PLATFORM_VERSION} >> "$top/cts/tests/tests/os/assets/platform_versions.txt"
|
|
fi
|
|
if [ "$FINAL_PLATFORM_CODENAME" != "$CURRENT_PLATFORM_CODENAME" ]; then
|
|
echo "$CURRENT_PLATFORM_CODENAME" >> "./cts/tests/tests/os/assets/platform_versions.txt"
|
|
fi
|
|
git -C "$top/cts" mv hostsidetests/theme/assets/${FINAL_PLATFORM_CODENAME} hostsidetests/theme/assets/${FINAL_PLATFORM_SDK_VERSION}
|
|
|
|
# TODO(b/333532038): Create ABI dumps in prebuilts/abi-dumps/platform
|
|
}
|
|
|
|
finalize_sdk_rel
|
|
|