Files
rk35xx-android14/development/scripts/codegen
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

21 lines
551 B
Bash
Executable File

#!/usr/bin/env bash
top="$(dirname $0)/../.."
function buildCodegen() {
$top/build/soong/soong_ui.bash --build-mode --all-modules --dir="$PWD" -j codegen_cli 1>&2
}
if ! command -v codegen_cli 2>&1 >/dev/null; then
# First time running codegen
buildCodegen
else
latestVersion=$(cat $top/frameworks/base/tools/codegen/src/com/android/codegen/SharedConstants.kt | grep 'CODEGEN_VERSION =' | awk '{ print $5 }' | tr -d '"')
if [[ $(codegen_cli --version) != $latestVersion ]]; then
# Update codegen
buildCodegen
fi
fi
exec codegen_cli "$@"