From 560d59cd76b258a0bd6e509ec50628e1114f3527 Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 18 May 2026 05:10:23 -0500 Subject: [PATCH] chore(android): update build configuration --- android/app/build.gradle | 6 ++++++ scripts/build-android-wheels-local.sh | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 54ef0a7f..720f2d21 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -97,6 +97,12 @@ tasks.register("fetchRepositoryBundledWheels", Exec) { commandLine(pyExe, "scripts/build/fetch_repository_wheels.py") ignoreExitValue = false onlyIf { + if (System.getenv("MESHCHATX_OFFLINE_BUILD") == "1") { + if (!repositoryBundledWheelsDir.isDirectory() || !repositoryBundledWheelsDir.list()?.any { it.endsWith(".whl") }) { + throw new org.gradle.api.GradleException("MESHCHATX_OFFLINE_BUILD=1 but repository bundled wheels are missing at ${repositoryBundledWheelsDir}") + } + return false + } if (System.getenv("MESHCHATX_SKIP_REPOSITORY_WHEELS_FETCH") == "1") { return false } diff --git a/scripts/build-android-wheels-local.sh b/scripts/build-android-wheels-local.sh index 22224715..781c0729 100755 --- a/scripts/build-android-wheels-local.sh +++ b/scripts/build-android-wheels-local.sh @@ -39,6 +39,11 @@ EOF ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +if [ "${MESHCHATX_OFFLINE_BUILD:-}" = "1" ]; then + echo "MESHCHATX_OFFLINE_BUILD=1: Android wheel build requires network access. Pre-build wheels offline or unset MESHCHATX_OFFLINE_BUILD." >&2 + exit 1 +fi + PYTHON_MINOR="3.11" TARGET_VERSION="" CHAQUOPY_REF="${CHAQUOPY_REF:-master}"