Skip to content

Commit

Permalink
Refactor project
Browse files Browse the repository at this point in the history
  • Loading branch information
Mosc committed Oct 23, 2023
1 parent 021f236 commit 6a509c9
Show file tree
Hide file tree
Showing 451 changed files with 14,080 additions and 13,487 deletions.
4 changes: 0 additions & 4 deletions .fvm/fvm_config.json

This file was deleted.

3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.16.0-0.2.pre"
}
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
62 changes: 23 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,43 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
pull_request:
branches:
- '**'
jobs:
ci:
name: CI
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Parse FVM config
id: fvm-config-action
uses: kuhnroyal/[email protected]
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.3.4
channel: stable
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: any
cache: true
- name: Cache pub
uses: actions/cache@v3
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Get pub
run: flutter pub get
- name: Generate code
run: flutter pub run build_runner build -d
- name: Check formatting
run: flutter format -n --set-exit-if-changed .
- name: Analyze code
run: flutter analyze
- name: Get Android keystore
id: android_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: key.jks
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: Build Android APK
run: flutter build apk
- name: Upload APK artifact
- name: Setup Melos
uses: bluefireteam/melos-action@v2
- name: Run static analysis checks
run: melos lint
- name: Build Android APK (profile)
run: flutter build apk --profile
- name: Upload APK (profile) artifact
uses: actions/upload-artifact@v3
with:
name: app-release.apk
path: build/app/outputs/apk/release/app-release.apk
name: app-profile.apk
path: build/app/outputs/apk/profile/app-profile.apk
119 changes: 86 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,118 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
play-store:
name: Play Store
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.3.4
channel: stable
cache: true
- name: Cache pub
uses: actions/cache@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Get pub
run: flutter pub get
- name: Generate code
run: flutter pub run build_runner build -d
- name: Check formatting
run: flutter format -n --set-exit-if-changed .
- name: Analyze code
run: flutter analyze
distribution: temurin
java-version: 17
cache: gradle
- name: Get Android keystore
id: android_keystore
id: android-keystore
uses: timheuer/base64-to-file@v1
with:
fileName: key.jks
fileName: keystore.jks
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
uses: GuillaumeFalourd/write-java-properties-file@v1
with:
file_path: ./android/key.properties
property: |
storeFile
storePassword
keyPassword
keyAlias
value: |
${{ steps.android-keystore.outputs.filePath }}
${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
${{ secrets.ANDROID_KEY_PASSWORD }}
${{ secrets.ANDROID_KEY_ALIAS }}
- name: Parse FVM config
id: fvm-config-action
uses: kuhnroyal/[email protected]
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: any
cache: true
- name: Setup Melos
uses: bluefireteam/melos-action@v2
- name: Build Android APK
run: flutter build apk
- name: Build Android App Bundle
run: flutter build appbundle
- name: Upload AAB artifact
- name: Upload APK artifact
uses: actions/upload-artifact@v3
with:
name: app-release.apk
path: build/app/outputs/apk/release/app-release.apk
- name: Upload App Bundle artifact
uses: actions/upload-artifact@v3
with:
name: app-release.aab
path: build/app/outputs/bundle/release/app-release.aab
release-github:
name: Release to GitHub
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Parse pubspec
id: pubspec
uses: altive/pubspec-metadata@v1
- name: Get artifact
id: download-artifact
uses: actions/download-artifact@v3
with:
name: app-release.apk
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: fastlane/metadata/android/en-US/changelogs/${{ steps.pubspec.outputs.build-number }}.txt
files: app-release.apk
release-play-store:
name: Release to Play Store
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
ruby-version: 3.2
bundler-cache: true
- name: Get artifact
id: download-artifact
uses: actions/download-artifact@v3
with:
name: app-release.aab
- name: Release to Google Play
uses: maierj/[email protected]
with:
lane: supply
options: '{ "aab": "app-release.aab" }'
env:
SUPPLY_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
run: bundle exec fastlane run supply aab:build/app/outputs/bundle/release/app-release.aab
109 changes: 89 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
Expand All @@ -13,23 +14,96 @@
*.iml
*.ipr
*.iws
.idea/
.idea/*

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Visual Studio Code related
.classpath
.project
.settings/
.vscode/*

# Flutter repo-specific
/bin/cache/
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/docs/doc/
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version

# packages file containing multi-root paths
.packages.generated

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.fvm/
.packages
.pub-cache/
.pub/
/build/
build/
flutter_*.png
linked_*.ds
pubspec_overrides.yaml
unlinked.ds
unlinked_spec.ds

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
**/android/.idea/
*.jks

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/.last_build_id
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Coverage
coverage/

# Submodules
!pubspec.lock
packages/**/pubspec.lock

# Web related
lib/generated_plugin_registrant.dart
Expand All @@ -40,17 +114,12 @@ app.*.symbols
# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# build_runner generated files
*.freezed.dart
*.g.dart

# Flutter generate generated files
**/l10n/*.dart

# FVM
.fvm/flutter_sdk
# Exceptions to the above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!.vscode/extensions.json
!.vscode/launch.json
Loading

0 comments on commit 6a509c9

Please sign in to comment.