Skip to content

Commit c6a2e5c

Browse files
Copilotkirklandsign
andcommitted
Refactor gradle command to reduce code duplication
Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
1 parent b8c44df commit c6a2e5c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

llm/android/LlamaDemo/scripts/run-ci-tests.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,11 @@ adb logcat > /tmp/logcat.txt &
9292
LOGCAT_PID=$!
9393

9494
echo "=== Starting Gradle ==="
95+
GRADLE_ARGS="-PskipModelDownload=true -PmodelPreset=$MODEL_PRESET"
9596
if [ "$USE_LOCAL_AAR" = "true" ]; then
96-
./gradlew connectedCheck \
97-
-PskipModelDownload=true \
98-
-PmodelPreset="$MODEL_PRESET" \
99-
-PuseLocalAar=true
100-
else
101-
./gradlew connectedCheck \
102-
-PskipModelDownload=true \
103-
-PmodelPreset="$MODEL_PRESET"
97+
GRADLE_ARGS="$GRADLE_ARGS -PuseLocalAar=true"
10498
fi
99+
./gradlew connectedCheck $GRADLE_ARGS
105100
TEST_EXIT_CODE=$?
106101

107102
echo "=== Model directory after Gradle ==="

0 commit comments

Comments
 (0)