From e78e740a424d23f9c43cf95b7c923e0f84f15ce6 Mon Sep 17 00:00:00 2001 From: Jackeagle <116548-Jackeagle@users.noreply.gitlab.e.foundation> Date: Wed, 4 Sep 2024 05:06:25 +0000 Subject: [PATCH] build.sh: Introduce conditional REPO_GROUPS variable to dynamically manage repo groups. - Starting from Android 14 since ELF check is enforced, vendor repos require its device repos. - If android_version_major is 14 or above then, REPO_GROUPS includes muppets for the specific device. --- src/build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 9a4ec91..18409cb 100755 --- a/src/build.sh +++ b/src/build.sh @@ -172,7 +172,16 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then git checkout default.xml cd ../.. fi - yes | repo init $REPO_INIT_PARAM -u "$REPO" -b "${TAG_PREFIX}${BRANCH_NAME}" + + # Set the REPO_GROUPS variable based on the android_version_major + if [ "$android_version_major" -ge 14 ]; then + REPO_GROUPS="-g default,-darwin,-muppets,muppets_$DEVICE" + else + REPO_GROUPS="" + fi + + # Repo init source + yes | repo init $REPO_INIT_PARAM -u "$REPO" -b "${TAG_PREFIX}${BRANCH_NAME}" $REPO_GROUPS if [ "$REPO_CUSTOM_MANIFEST" != false ]; then wget -O .repo/manifests/default.xml $REPO_CUSTOM_MANIFEST -- GitLab