Skip to content

Commit 4fd58a1

Browse files
abueideclaude
andcommitted
refactor(tests): remove unnecessary SDK setup workaround
Process-compose processes inherit the devbox environment, including ANDROID_SDK_ROOT which is set by the init_hook. The manual SDK setup in build commands was unnecessary duplication. Test confirmed that process-compose inherits environment: ANDROID_SDK_ROOT=/nix/store/.../androidsdk/libexec/android-sdk The init_hook in plugin.json already handles SDK setup via: plugins/android/virtenv/scripts/init/setup.sh Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent b9eb8a8 commit 4fd58a1

3 files changed

Lines changed: 1 addition & 23 deletions

File tree

examples/android/tests/test-suite.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ is_strict: true
1212
processes:
1313
# Phase 1: Build - runs first (no dependency)
1414
build-app:
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
15+
command: "gradle assembleDebug"
2416
availability:
2517
restart: "no"
2618

examples/react-native/tests/test-suite-all-e2e.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ processes:
2121
command: |
2222
set -e
2323
24-
# Ensure Android SDK is set up (needed when calling gradle directly)
25-
if [ -z "${ANDROID_SDK_ROOT:-}" ] && [ -n "${ANDROID_SCRIPTS_DIR:-}" ]; then
26-
if [ -f "${ANDROID_SCRIPTS_DIR}/init/setup.sh" ]; then
27-
. "${ANDROID_SCRIPTS_DIR}/init/setup.sh"
28-
fi
29-
fi
30-
3124
# Source Metro environment so build knows correct port
3225
. ${REACT_NATIVE_VIRTENV}/metro/env-all.sh
3326
echo "Metro port for build: $METRO_PORT"

examples/react-native/tests/test-suite-android-e2e.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ processes:
2020
command: |
2121
set -e
2222
23-
# Ensure Android SDK is set up (needed when calling gradle directly)
24-
if [ -z "${ANDROID_SDK_ROOT:-}" ] && [ -n "${ANDROID_SCRIPTS_DIR:-}" ]; then
25-
if [ -f "${ANDROID_SCRIPTS_DIR}/init/setup.sh" ]; then
26-
. "${ANDROID_SCRIPTS_DIR}/init/setup.sh"
27-
fi
28-
fi
29-
3023
# Source Metro environment so build knows correct port
3124
. ${REACT_NATIVE_VIRTENV}/metro/env-android.sh
3225
echo "Metro port for build: $METRO_PORT"

0 commit comments

Comments
 (0)