generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
62 lines (53 loc) · 1.13 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
# Run the Flutter app
run:
flutter run
# Get Flutter and Dart packages
get:
#!/bin/bash
echo "Getting dependencies for main project"
flutter pub get
echo "Getting dependencies for packages"
for dir in packages/*; do \
if [ -d $dir ]; then \
echo "Getting dependencies in $dir"; \
(cd $dir && flutter pub get || dart pub get); \
fi \
done
# Clean the project
clean:
flutter clean
# Build the app for release
build:
flutter build apk
# Run tests
test: test-app test-packages
# Run Flutter tests
test-app:
flutter test
# Run package tests
test-packages:
#!/bin/bash
for dir in packages/*; do \
if [ -d $dir ]; then \
echo "Running tests in $dir"; \
(cd $dir && dart test); \
fi \
done
# Analyze the project's Dart code
analyze:
#!/bin/bash
flutter analyze
for dir in packages/*; do \
if [ -d $dir ]; then \
(cd $dir && dart analyze); \
fi \
done
# Generate code (localization, etc.)
generate:
flutter gen-l10n
# Coverage report
coverage:
#!/bin/bash
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html