24 lines
662 B
Plaintext
24 lines
662 B
Plaintext
|
|
run platform="pc":
|
|
#!/usr/bin/env bash
|
|
if [ "{{platform}}" = "pc" ]; then
|
|
cargo run
|
|
elif [ "{{platform}}" = "mobile" ]; then
|
|
is_paired="$(adb get-state 1> /dev/null 2>&1 && echo "device attached" || echo "no device found")"
|
|
if [ "$is_paired" = "no device found" ]; then
|
|
echo "no device paired! run 'adb connect <target>'"
|
|
exit 1
|
|
fi
|
|
adb install ./app/build/outputs/apk/debug/app-debug.apk
|
|
adb shell monkey -p xyz.pixelatedw.avoid 1
|
|
fi
|
|
|
|
build platform="pc":
|
|
#!/usr/bin/env bash
|
|
cargo build
|
|
if [ "{{platform}}" = "mobile" ]; then
|
|
cargo ndk -t arm64-v8a -o ./app/src/main/jniLibs build --release --package avoid-rs
|
|
./gradlew build
|
|
fi
|
|
|