-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
90 lines (83 loc) · 2.59 KB
/
Taskfile.yml
File metadata and controls
90 lines (83 loc) · 2.59 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
version: '3'
tasks:
default:
desc: Build everything (Server, Web, Linux App, Android App)
deps: [build-server, build-web, build-linux, build-android]
build-server:
desc: Build the Go server for local development
sources:
- "**/*.go"
- "go.mod"
- "go.sum"
generates:
- goleds
cmds:
- go build -o goleds .
generate-icons:
desc: Generate app icons from SVG source
sources:
- "mobile/assets/icon.svg"
generates:
- "mobile/assets/icon.png"
cmds:
- convert -background none -resize 1024x1024 mobile/assets/icon.svg mobile/assets/icon.png
- cd mobile && dart run flutter_launcher_icons
build-web:
desc: Build Flutter Web app and deploy to ./web
deps: [generate-icons]
sources:
- "mobile/lib/**/*.dart"
- "mobile/pubspec.yaml"
- "mobile/pubspec.lock"
- "mobile/web/**/*"
generates:
- "web/index.html"
- "goleds_web.tar.gz"
cmds:
- cd mobile && flutter build web --release --no-wasm-dry-run
- rm -rf web/*
- cp -r mobile/build/web/* web/
- tar -czf goleds_web.tar.gz web/
- echo "Web build deployed to ./web and archived to ./goleds_web.tar.gz"
build-linux:
desc: Build Flutter Linux Desktop app
deps: [generate-icons]
sources:
- "mobile/lib/**/*.dart"
- "mobile/pubspec.yaml"
- "mobile/pubspec.lock"
- "mobile/linux/main.cc"
- "mobile/linux/my_application.cc"
- "mobile/linux/CMakeLists.txt"
generates:
- "commander_linux/goleds_commander"
cmds:
- cd mobile && flutter build linux --release
- rm -rf commander_linux
- mkdir -p commander_linux
- cp -r mobile/build/linux/x64/release/bundle/* commander_linux/
- echo "Linux app bundle deployed to ./commander_linux/"
build-android:
desc: Build Flutter Android APK
deps: [generate-icons]
sources:
- "mobile/lib/**/*.dart"
- "mobile/pubspec.yaml"
- "mobile/pubspec.lock"
- "mobile/android/build.gradle.kts"
- "mobile/android/settings.gradle.kts"
- "mobile/android/app/build.gradle.kts"
- "mobile/android/app/src/**/*"
generates:
- "goleds_commander.apk"
cmds:
- cd mobile && flutter build apk --release
- cp mobile/build/app/outputs/flutter-apk/app-release.apk goleds_commander.apk
- echo "APK copied to ./goleds_commander.apk"
clean:
desc: Clean all artifacts
cmds:
- rm -f goleds goleds_commander.apk goleds_web.tar.gz
- rm -rf web/* commander_linux/
- cmd: cd mobile && flutter clean
ignore_error: true