Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
112 lines (86 loc) · 3.84 KB
/
Copy pathjustfile
File metadata and controls
112 lines (86 loc) · 3.84 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
set positional-arguments
set dotenv-load
adb_serial := env('FIDGET_ADB_IP', '') + ':' + env('FIDGET_ADB_PORT', '')
# Show available development tasks.
default:
@just --list
# Verify the pinned Flutter and Android environment.
env:
nix develop -c ./scripts/check-dev-env.sh
# Fetch the application's declared dependencies.
deps:
nix develop -c flutter pub get
# Format application code and tests.
format:
nix develop -c dart format lib test
# Run strict static analysis.
analyze:
nix develop -c flutter analyze --fatal-infos
# Run all tests, or pass a test path and Flutter test flags.
test *args:
nix develop -c flutter test "$@"
# Refresh visual references; inspect every changed image before committing.
goldens:
nix develop -c flutter test --update-goldens test/app_golden_test.dart test/ui_consistency_test.dart test/features/spinner/spinner_painter_test.dart test/features/toolkit/roller_control_test.dart
# Check formatting, analysis, and tests using the repository quality script.
check:
nix develop -c ./scripts/check-quality.sh
# Run quality checks and build a debug APK.
check-build:
nix develop -c ./scripts/check-quality.sh --build
# Build a debug APK.
build:
nix develop -c flutter build apk --debug
# Build a compact ARM64-only release APK for the Pixel and other ARM64 phones.
release *args:
nix develop -c flutter build apk --release --target-platform android-arm64 --split-per-abi "$@"
# Build the production-signed Android App Bundle required by Google Play.
# Set the four FIDGET_RELEASE_* variables described in docs/RELEASE.md first.
bundle *args:
nix develop -c flutter build appbundle --release "$@"
# List connected Android devices before selecting a target.
devices:
nix develop -c adb devices -l
# Interactively save the current wireless IP and connection port in ignored .env.
adb-setup *args:
nix develop -c python3 scripts/setup-adb-env.py "$@"
# Connect using .env, or supply an explicit host:port.
connect serial=adb_serial:
test "$1" != ':' || { echo 'Run just adb-setup first.' >&2; exit 1; }
nix develop -c adb connect "$1"
# Run with hot reload using .env, or supply a device serial.
run serial=adb_serial:
test "$1" != ':' || { echo 'Run just adb-setup first.' >&2; exit 1; }
nix develop -c flutter run -d "$1"
# Build and install the ARM64 release; defaults to the device in .env.
install serial=adb_serial: release
just install-built "$1"
# Install the existing ARM64-only release APK without rebuilding it.
install-built serial=adb_serial:
test "$1" != ':' || { echo 'Run just adb-setup first.' >&2; exit 1; }
nix develop -c adb -s "$1" install --no-streaming -r build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
# Launch the installed app and wait for its activity to open.
launch:
just adb shell am start -W -n net.oddship.fidget_toys/.MainActivity
# Capture the currently visible phone screen to an explicitly chosen PNG path.
screenshot output:
just adb exec-out screencap -p > "$1"
# Install opt-in motion tracing; restore a normal build with just install afterward.
motion-debug:
just release --dart-define=FIDGET_MOTION_TRACE=true
just install-built
just adb shell am start -n net.oddship.fidget_toys/.MainActivity
# Install opt-in frame timing diagnostics; restore logging-free with just install.
frame-debug:
just release --dart-define=FIDGET_FRAME_TRACE=true
just install-built
just launch
just install-built
just launch
# Send an ADB command to the device configured in .env.
adb *args:
test -n "$FIDGET_ADB_IP" && test -n "$FIDGET_ADB_PORT" || { echo 'Run just adb-setup first.' >&2; exit 1; }
nix develop -c adb -s "$FIDGET_ADB_IP:$FIDGET_ADB_PORT" "$@"
# Validate repository skill frontmatter and Markdown links.
skills-check:
nix develop -c python3 skills/meta-self-improvement/scripts/validate_repo_skills.py