generated from block/oss-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
70 lines (53 loc) · 1.45 KB
/
Justfile
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
_help:
@just -l
# Setup the environment. Useful for initial development setup.
setup:
#!/bin/bash
rustup default stable
cargo install flutter_rust_bridge_codegen
cp env.example.json env.json
# Run the Flutter app
run:
@flutter run --dart-define-from-file=env.json
# Get Flutter and Dart packages
get:
#!/bin/bash
echo "Getting dependencies for main project"
flutter pub get
echo "Getting dependencies for all Dart/Flutter packages..."
# Find all pubspec.yaml files
find rust_builder -name "pubspec.yaml" | while read pubspec; do
dir=$(dirname "$pubspec")
echo "Installing dependencies in $dir"
cd "$dir"
# Try flutter pub get first, fall back to dart pub get if it fails
flutter pub get > /dev/null 2>&1 || dart pub get
cd - > /dev/null
done
# Clean the project
clean:
flutter clean
# Build the app for release
build:
flutter build apk --dart-define-from-file=env.json
# Run tests
test:
flutter test --dart-define-from-file=env.json
# Analyze the project's Dart code
analyze:
#!/bin/bash
flutter analyze
# Generate code (localization, etc.)
gen-l10n:
flutter gen-l10n
# Generate the Rust bindings
generate-rust:
flutter_rust_bridge_codegen generate
# Generate the Rust bindings
generate: gen-l10n generate-rust
# Coverage report
coverage:
#!/bin/bash
flutter test --coverage --dart-define-from-file=env.json
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html