Skip to content

Commit fcc005c

Browse files
abueideclaude
andcommitted
fix(android): ensure SDK is set up before gradle build
When we removed android.sh build, we lost the automatic SDK setup that was at the top of android.sh. Now gradle is called directly without the environment being initialized, causing 'SDK location not found' errors. Added explicit SDK setup check before gradle build in test suite: - Source ANDROID_SCRIPTS_DIR/init/setup.sh if ANDROID_SDK_ROOT not set - Matches the auto-setup logic that was in android.sh Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 460e04c commit fcc005c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

examples/android/tests/test-suite.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ is_strict: true
1212
processes:
1313
# Phase 1: Build - runs first (no dependency)
1414
build-app:
15-
command: "gradle assembleDebug"
15+
command: |
16+
set -e
17+
# Ensure Android SDK is set up (needed when calling gradle directly)
18+
if [ -z "${ANDROID_SDK_ROOT:-}" ] && [ -n "${ANDROID_SCRIPTS_DIR:-}" ]; then
19+
if [ -f "${ANDROID_SCRIPTS_DIR}/init/setup.sh" ]; then
20+
. "${ANDROID_SCRIPTS_DIR}/init/setup.sh"
21+
fi
22+
fi
23+
gradle assembleDebug
1624
availability:
1725
restart: "no"
1826

0 commit comments

Comments
 (0)