Repository navigation
Expand file tree
/
Copy pathmake.bat
More file actions
89 lines (76 loc) Β· 1.91 KB
/
Copy pathmake.bat
File metadata and controls
89 lines (76 loc) Β· 1.91 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
@echo off
REM make.bat - Flutter Clean Arch Unicorn
REM https://github.com/ratingtesting/flutter-clean-arch-unicorn
REM Usage: make.bat [command]
setlocal enabledelayedexpansion
if "%1"=="" goto help
if "%1"=="setup" goto setup
if "%1"=="check" goto check
if "%1"=="test" goto test
if "%1"=="analyze" goto analyze
if "%1"=="format" goto format
if "%1"=="run-dev" goto run-dev
if "%1"=="build-apk" goto build-apk
if "%1"=="clean" goto clean
if "%1"=="help" goto help
echo Unknown command: %1
goto help
:setup
echo π§ Setting up project...
flutter pub get
echo β
Setup complete.
goto end
:check
call :analyze
call :test
call :format
goto end
:test
echo π§ͺ Running tests...
flutter test
echo β
Tests passed.
goto end
:analyze
echo π Analyzing code...
flutter analyze --fatal-infos --fatal-warnings
echo β
Analysis passed.
goto end
:format
echo π¨ Checking formatting...
flutter format --set-exit-if-changed .
echo β
Formatting OK.
goto end
:run-dev
echo π Starting DEV environment...
flutter run -t lib/main/main_dev.dart --dart-define=BASE_URL=https://api-dev.example.com
goto end
:build-apk
echo π¦ Building Android APK...
flutter build apk --debug -t lib/main/main_dev.dart
echo β
APK built: build\app\outputs\flutter-apk\app-debug.apk
goto end
:clean
echo π§Ή Cleaning...
flutter clean
flutter pub get
echo β
Clean complete.
goto end
:help
echo Flutter Clean Arch Unicorn - Available commands:
echo.
echo setup - Install dependencies
echo check - Run analyze + test + format
echo test - Run all tests
echo analyze - Run static analysis
echo format - Check code formatting
echo run-dev - Run app in dev mode
echo build-apk - Build Android APK
echo clean - Clean build artifacts
echo help - Show this help
echo.
echo GitHub: https://github.com/ratingtesting/flutter-clean-arch-unicorn
echo.
echo Example: make.bat setup ^&^& make.bat run-dev
goto end
:end
endlocal