forked from android/android-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_and_install.sh
More file actions
executable file
·36 lines (28 loc) · 1.16 KB
/
build_and_install.sh
File metadata and controls
executable file
·36 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Script to build AndroidX Test m2repository and install orchestrator APKs
# Based on CONTRIBUTING.md instructions
set -e # Exit on any error
echo "๐จ Building AndroidX Test m2repository..."
bazelisk build :axt_m2repository
echo "๐ฆ Unpacking m2repository to ~/.m2/"
unzip -o bazel-bin/axt_m2repository.zip -d ~/.m2/
echo "๐ฑ Installing orchestrator and services APKs..."
# Find and install test services APK
SERVICES_APK=~/.m2/repository/androidx/test/services/test-services/1.7.0-alpha01/test-services-1.7.0-alpha01.apk
if [ -n "$SERVICES_APK" ]; then
echo "Installing test services APK: $SERVICES_APK"
adb install --force-queryable -r "$SERVICES_APK"
else
echo "โ Test services APK not found in ~/.m2/repository"
exit 1
fi
# Find and install orchestrator APK
ORCHESTRATOR_APK=~/.m2/repository/androidx/test/orchestrator/1.7.0-alpha01/orchestrator-1.7.0-alpha01.apk
if [ -n "$ORCHESTRATOR_APK" ]; then
echo "Installing orchestrator APK: $ORCHESTRATOR_APK"
adb install --force-queryable -r "$ORCHESTRATOR_APK"
else
echo "โ Orchestrator APK not found in ~/.m2/repository"
exit 1
fi
echo "โ
Build and installation complete!"