From d436725581ba01d4dea2ec97a406b45af0a48c2a Mon Sep 17 00:00:00 2001 From: Lanchon Date: Wed, 2 Aug 2023 15:43:36 -0300 Subject: [PATCH] Add 'WITH_MICROG' setting Introduce 'WITH_MICROG' to replace use of 'WITH_GMS'. Fixes #358. --- Dockerfile | 3 +++ src/build.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 93b5a9f9..1f188164 100644 --- a/Dockerfile +++ b/Dockerfile @@ -93,6 +93,9 @@ ENV ZIP_SUBDIR true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true +# Include microG's components in the ROM +ENV WITH_MICROG false + # Apply the MicroG's signature spoofing patch # Valid values are "no", "yes" (for the original MicroG's patch) and # "restricted" (to grant the permission only to the system privileged apps). diff --git a/src/build.sh b/src/build.sh index 604d64a1..d3d11675 100755 --- a/src/build.sh +++ b/src/build.sh @@ -207,6 +207,11 @@ for branch in ${BRANCH_NAME//,/ }; do los_ver_minor=$(sed -n -e 's/^\s*PRODUCT_VERSION_MINOR = //p' "$makefile_containing_version") los_ver="$los_ver_major.$los_ver_minor" + # If needed, include microG's components + if [ "$WITH_MICROG" = true ]; then + echo '$(call inherit-product, vendor/partner_gms/products/gms.mk)' > "vendor/$vendor/config/partner_gms.mk" + fi + # If needed, apply the microG's signature spoofing patch if [ "$SIGNATURE_SPOOFING" = "yes" ] || [ "$SIGNATURE_SPOOFING" = "restricted" ]; then # Determine which patch should be applied to the current Android source tree