blob: ce90ac0ba00a631c27ec66568745737be4e0e8ca [file] [log] [blame]
Steven Moreland35496592022-04-19 00:57:45 +00001#!/bin/bash
2
Steven Moreland4d4b5802022-06-02 17:21:30 +00003set -ex
Steven Moreland35496592022-04-19 00:57:45 +00004
Steven Moreland4d4b5802022-06-02 17:21:30 +00005function finalize_main() {
6 local top="$(dirname "$0")"/../..
Steven Moreland35496592022-04-19 00:57:45 +00007
Steven Moreland4d4b5802022-06-02 17:21:30 +00008 # default target to modify tree and build SDK
9 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
Steven Moreland35496592022-04-19 00:57:45 +000010
Steven Moreland4d4b5802022-06-02 17:21:30 +000011 # This script is WIP and only finalizes part of the Android branch for release.
12 # The full process can be found at (INTERNAL) go/android-sdk-finalization.
Steven Moreland35496592022-04-19 00:57:45 +000013
Steven Moreland4d4b5802022-06-02 17:21:30 +000014 # VNDK snapshot (TODO)
15 # SDK snapshots (TODO)
16 # Update references in the codebase to new API version (TODO)
17 # ...
Steven Moreland35496592022-04-19 00:57:45 +000018
Hsin-Yi Chen6c2353d2022-07-08 12:09:10 +080019 AIDL_TRANSITIVE_FREEZE=true $m aidl-freeze-api create_reference_dumps
20
21 # Generate ABI dumps
22 ANDROID_BUILD_TOP="$top" \
23 out/host/linux-x86/bin/create_reference_dumps \
24 -p aosp_arm64 --build-variant user
Steven Moreland35496592022-04-19 00:57:45 +000025
Steven Moreland4d4b5802022-06-02 17:21:30 +000026 # Update new versions of files. See update-vndk-list.sh (which requires envsetup.sh)
27 $m check-vndk-list || \
28 { cp $top/out/soong/vndk/vndk.libraries.txt $top/build/make/target/product/gsi/current.txt; }
Steven Moreland35496592022-04-19 00:57:45 +000029
Hsin-Yi Chen6c2353d2022-07-08 12:09:10 +080030 # This command tests:
31 # The release state for AIDL.
32 # ABI difference between user and userdebug builds.
33 # In the future, we would want to actually turn the branch into the REL
34 # state and test with that.
35 AIDL_FROZEN_REL=true $m droidcore
Steven Moreland392499b2022-04-22 22:07:27 +000036
Steven Moreland4d4b5802022-06-02 17:21:30 +000037 # Build SDK (TODO)
38 # lunch sdk...
39 # m ...
40}
Steven Moreland35496592022-04-19 00:57:45 +000041
Steven Moreland4d4b5802022-06-02 17:21:30 +000042finalize_main