Skip to content

Commit 6a509c9

Browse files
committed
Refactor project
1 parent 021f236 commit 6a509c9

File tree

451 files changed

+14080
-13487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+14080
-13487
lines changed

.fvm/fvm_config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.16.0-0.2.pre"
3+
}

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
- package-ecosystem: "pub"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,43 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
65
- '**'
76
tags-ignore:
87
- 'v*'
98
pull_request:
10-
branches:
11-
- '**'
129
jobs:
13-
ci:
14-
name: CI
10+
build:
11+
name: Build
1512
runs-on: ubuntu-latest
1613
steps:
1714
- name: Checkout
18-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1916
with:
2017
fetch-depth: 0
18+
- name: Setup Java
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: temurin
22+
java-version: 17
23+
cache: gradle
24+
- name: Parse FVM config
25+
id: fvm-config-action
26+
uses: kuhnroyal/flutter-fvm-config-action@v2.0
2127
- name: Setup Flutter
2228
uses: subosito/flutter-action@v2
2329
with:
24-
flutter-version: 3.3.4
25-
channel: stable
30+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
31+
channel: any
2632
cache: true
27-
- name: Cache pub
28-
uses: actions/cache@v3
29-
with:
30-
path: ${{ env.FLUTTER_HOME }}/.pub-cache
31-
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
32-
restore-keys: ${{ runner.os }}-pub-
33-
- name: Get pub
34-
run: flutter pub get
35-
- name: Generate code
36-
run: flutter pub run build_runner build -d
37-
- name: Check formatting
38-
run: flutter format -n --set-exit-if-changed .
39-
- name: Analyze code
40-
run: flutter analyze
41-
- name: Get Android keystore
42-
id: android_keystore
43-
uses: timheuer/base64-to-file@v1
44-
with:
45-
fileName: key.jks
46-
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
47-
- name: Create key.properties
48-
run: |
49-
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
50-
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
51-
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
52-
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
53-
- name: Build Android APK
54-
run: flutter build apk
55-
- name: Upload APK artifact
33+
- name: Setup Melos
34+
uses: bluefireteam/melos-action@v2
35+
- name: Run static analysis checks
36+
run: melos lint
37+
- name: Build Android APK (profile)
38+
run: flutter build apk --profile
39+
- name: Upload APK (profile) artifact
5640
uses: actions/upload-artifact@v3
5741
with:
58-
name: app-release.apk
59-
path: build/app/outputs/apk/release/app-release.apk
42+
name: app-profile.apk
43+
path: build/app/outputs/apk/profile/app-profile.apk

.github/workflows/release.yml

Lines changed: 86 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,118 @@
11
name: Release
2-
32
on:
43
push:
54
tags:
65
- 'v*'
76
workflow_dispatch:
87
jobs:
9-
play-store:
10-
name: Play Store
8+
build:
9+
name: Build
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout
14-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1514
with:
1615
fetch-depth: 0
17-
- name: Setup Flutter
18-
uses: subosito/flutter-action@v2
19-
with:
20-
flutter-version: 3.3.4
21-
channel: stable
22-
cache: true
23-
- name: Cache pub
24-
uses: actions/cache@v3
16+
- name: Setup Java
17+
uses: actions/setup-java@v3
2518
with:
26-
path: ${{ env.FLUTTER_HOME }}/.pub-cache
27-
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
28-
restore-keys: ${{ runner.os }}-pub-
29-
- name: Get pub
30-
run: flutter pub get
31-
- name: Generate code
32-
run: flutter pub run build_runner build -d
33-
- name: Check formatting
34-
run: flutter format -n --set-exit-if-changed .
35-
- name: Analyze code
36-
run: flutter analyze
19+
distribution: temurin
20+
java-version: 17
21+
cache: gradle
3722
- name: Get Android keystore
38-
id: android_keystore
23+
id: android-keystore
3924
uses: timheuer/base64-to-file@v1
4025
with:
41-
fileName: key.jks
26+
fileName: keystore.jks
4227
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
4328
- name: Create key.properties
44-
run: |
45-
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
46-
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
47-
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
48-
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
29+
uses: GuillaumeFalourd/write-java-properties-file@v1
30+
with:
31+
file_path: ./android/key.properties
32+
property: |
33+
storeFile
34+
storePassword
35+
keyPassword
36+
keyAlias
37+
value: |
38+
${{ steps.android-keystore.outputs.filePath }}
39+
${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
40+
${{ secrets.ANDROID_KEY_PASSWORD }}
41+
${{ secrets.ANDROID_KEY_ALIAS }}
42+
- name: Parse FVM config
43+
id: fvm-config-action
44+
uses: kuhnroyal/flutter-fvm-config-action@v2.0
45+
- name: Setup Flutter
46+
uses: subosito/flutter-action@v2
47+
with:
48+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
49+
channel: any
50+
cache: true
51+
- name: Setup Melos
52+
uses: bluefireteam/melos-action@v2
53+
- name: Build Android APK
54+
run: flutter build apk
4955
- name: Build Android App Bundle
5056
run: flutter build appbundle
51-
- name: Upload AAB artifact
57+
- name: Upload APK artifact
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: app-release.apk
61+
path: build/app/outputs/apk/release/app-release.apk
62+
- name: Upload App Bundle artifact
5263
uses: actions/upload-artifact@v3
5364
with:
5465
name: app-release.aab
5566
path: build/app/outputs/bundle/release/app-release.aab
67+
release-github:
68+
name: Release to GitHub
69+
runs-on: ubuntu-latest
70+
needs: build
71+
if: startsWith(github.ref, 'refs/tags/')
72+
permissions:
73+
contents: write
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
with:
78+
fetch-depth: 0
79+
- name: Parse pubspec
80+
id: pubspec
81+
uses: altive/pubspec-metadata@v1
82+
- name: Get artifact
83+
id: download-artifact
84+
uses: actions/download-artifact@v3
85+
with:
86+
name: app-release.apk
87+
- name: Release
88+
uses: softprops/action-gh-release@v1
89+
with:
90+
body_path: fastlane/metadata/android/en-US/changelogs/${{ steps.pubspec.outputs.build-number }}.txt
91+
files: app-release.apk
92+
release-play-store:
93+
name: Release to Play Store
94+
runs-on: ubuntu-latest
95+
needs: build
96+
steps:
97+
- name: Checkout
98+
uses: actions/checkout@v4
99+
with:
100+
fetch-depth: 0
56101
- name: Setup Ruby
57102
uses: ruby/setup-ruby@v1
58103
with:
59-
ruby-version: 3.1
104+
ruby-version: 3.2
60105
bundler-cache: true
106+
- name: Get artifact
107+
id: download-artifact
108+
uses: actions/download-artifact@v3
109+
with:
110+
name: app-release.aab
61111
- name: Release to Google Play
112+
uses: maierj/fastlane-action@v3.0.0
113+
with:
114+
lane: supply
115+
options: '{ "aab": "app-release.aab" }'
62116
env:
63117
SUPPLY_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }}
64118
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
65-
run: bundle exec fastlane run supply aab:build/app/outputs/bundle/release/app-release.aab

.gitignore

Lines changed: 89 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Miscellaneous
22
*.class
3+
*.lock
34
*.log
45
*.pyc
56
*.swp
@@ -13,23 +14,96 @@
1314
*.iml
1415
*.ipr
1516
*.iws
16-
.idea/
17+
.idea/*
1718

18-
# The .vscode folder contains launch configuration and tasks you configure in
19-
# VS Code which you may wish to be included in version control, so this line
20-
# is commented out by default.
21-
#.vscode/
19+
# Visual Studio Code related
20+
.classpath
21+
.project
22+
.settings/
23+
.vscode/*
24+
25+
# Flutter repo-specific
26+
/bin/cache/
27+
/bin/mingit/
28+
/dev/benchmarks/mega_gallery/
29+
/dev/bots/.recipe_deps
30+
/dev/bots/android_tools/
31+
/dev/docs/doc/
32+
/dev/docs/flutter.docs.zip
33+
/dev/docs/lib/
34+
/dev/docs/pubspec.yaml
35+
/dev/integration_tests/**/xcuserdata
36+
/dev/integration_tests/**/Pods
37+
/packages/flutter/coverage/
38+
version
39+
40+
# packages file containing multi-root paths
41+
.packages.generated
2242

2343
# Flutter/Dart/Pub related
2444
**/doc/api/
2545
**/ios/Flutter/.last_build_id
2646
.dart_tool/
2747
.flutter-plugins
2848
.flutter-plugins-dependencies
49+
.fvm/
2950
.packages
3051
.pub-cache/
3152
.pub/
32-
/build/
53+
build/
54+
flutter_*.png
55+
linked_*.ds
56+
pubspec_overrides.yaml
57+
unlinked.ds
58+
unlinked_spec.ds
59+
60+
# Android related
61+
**/android/**/gradle-wrapper.jar
62+
**/android/.gradle
63+
**/android/captures/
64+
**/android/gradlew
65+
**/android/gradlew.bat
66+
**/android/local.properties
67+
**/android/**/GeneratedPluginRegistrant.java
68+
**/android/key.properties
69+
**/android/.idea/
70+
*.jks
71+
72+
# iOS/XCode related
73+
**/ios/**/*.mode1v3
74+
**/ios/**/*.mode2v3
75+
**/ios/**/*.moved-aside
76+
**/ios/**/*.pbxuser
77+
**/ios/**/*.perspectivev3
78+
**/ios/**/*sync/
79+
**/ios/**/.sconsign.dblite
80+
**/ios/**/.tags*
81+
**/ios/**/.vagrant/
82+
**/ios/**/DerivedData/
83+
**/ios/**/Icon?
84+
**/ios/**/Pods/
85+
**/ios/**/.symlinks/
86+
**/ios/**/profile
87+
**/ios/**/xcuserdata
88+
**/ios/.generated/
89+
**/ios/Flutter/App.framework
90+
**/ios/Flutter/Flutter.framework
91+
**/ios/Flutter/Flutter.podspec
92+
**/ios/Flutter/Generated.xcconfig
93+
**/ios/Flutter/app.flx
94+
**/ios/Flutter/app.zip
95+
**/ios/Flutter/.last_build_id
96+
**/ios/Flutter/flutter_assets/
97+
**/ios/Flutter/flutter_export_environment.sh
98+
**/ios/ServiceDefinitions.json
99+
**/ios/Runner/GeneratedPluginRegistrant.*
100+
101+
# Coverage
102+
coverage/
103+
104+
# Submodules
105+
!pubspec.lock
106+
packages/**/pubspec.lock
33107

34108
# Web related
35109
lib/generated_plugin_registrant.dart
@@ -40,17 +114,12 @@ app.*.symbols
40114
# Obfuscation related
41115
app.*.map.json
42116

43-
# Android Studio will place build artifacts here
44-
/android/app/debug
45-
/android/app/profile
46-
/android/app/release
47-
48-
# build_runner generated files
49-
*.freezed.dart
50-
*.g.dart
51-
52-
# Flutter generate generated files
53-
**/l10n/*.dart
54-
55-
# FVM
56-
.fvm/flutter_sdk
117+
# Exceptions to the above rules.
118+
!**/ios/**/default.mode1v3
119+
!**/ios/**/default.mode2v3
120+
!**/ios/**/default.pbxuser
121+
!**/ios/**/default.perspectivev3
122+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
123+
!/dev/ci/**/Gemfile.lock
124+
!.vscode/extensions.json
125+
!.vscode/launch.json

0 commit comments

Comments
 (0)