Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/renovate/flutter_local_notificat…
Browse files Browse the repository at this point in the history
…ions-14.x' into dev
  • Loading branch information
vareversat committed May 8, 2023
2 parents 8f0550a + baf2d9f commit a5ee109
Show file tree
Hide file tree
Showing 67 changed files with 2,277 additions and 1,374 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/flutter.analyze-test.action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter analyze'
run: flutter analyze
run: flutter analyze lib
format:
name: 'Format'
runs-on: ubuntu-latest
Expand All @@ -38,6 +38,24 @@ jobs:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter format'
run: dart format lib --set-exit-if-changed
code-metrics:
name: 'Code metrics'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Setup flutter action'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Get dependencies'
run: flutter pub get
- name: '[Global] Code metrics'
run: flutter pub run dart_code_metrics:metrics analyze --fatal-style --fatal-warnings --fatal-performance --reporter=github lib
- name: '[Unused files] Code metrics'
run: flutter pub run dart_code_metrics:metrics check-unused-files lib
- name: '[Unused code] Code metrics'
run: flutter pub run dart_code_metrics:metrics check-unused-code lib
test:
name: 'Test'
runs-on: ubuntu-latest
Expand Down
196 changes: 98 additions & 98 deletions .github/workflows/flutter.build.action.yaml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: Flutter - Build

on:
workflow_call:
inputs:
flutter_version:
description: 'The Flutter used (ex: 2.5.1)'
required: true
type: string
android_output:
description: 'Android build file type output (apk or abb)'
required: true
type: string
secrets:
passphrase:
description: 'The passphrase to decrypt the configuration'
required: true


jobs:
build_android:
name: 'Android (${{ inputs.android_output }})'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/[email protected]
with:
fetch-depth: 0
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Set up JAVA'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11.x'
- name: 'Setup Flutter'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Build Android APK'
if: ${{ inputs.android_output == 'apk' }}
# Build APK version of the app
run: flutter build apk --split-per-abi
- name: 'Save APK'
if: ${{ inputs.android_output == 'apk' }}
uses: actions/upload-artifact@v3
with:
name: 'apk-build'
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk
- name: 'Generate build number'
if: ${{ inputs.android_output == 'aab' }}
# Build App Bundle version of the app
run: |
BUILD_NUMBER=$(git rev-list --all --count)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
echo "This build is tagged as $BUILD_NUMBER on $GITHUB_REF"
- name: 'Build Android App Bundle'
if: ${{ inputs.android_output == 'aab' }}
run: flutter build appbundle --dart-define=FLAVOR=prod --build-number="$BUILD_NUMBER"
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: 'Save AAB'
if: ${{ inputs.android_output == 'aab' }}
uses: actions/upload-artifact@v3
with:
name: 'aab-build'
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
name: 'iOS'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
build_web:
name: 'WEB'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
name: Flutter - Build

on:
workflow_call:
inputs:
flutter_version:
description: 'The Flutter used (ex: 2.5.1)'
required: true
type: string
android_output:
description: 'Android build file type output (apk or abb)'
required: true
type: string
secrets:
passphrase:
description: 'The passphrase to decrypt the configuration'
required: true


jobs:
build_android:
name: 'Android (${{ inputs.android_output }})'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/[email protected]
with:
fetch-depth: 0
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Set up JAVA'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11.x'
- name: 'Setup Flutter'
uses: subosito/[email protected]
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Build Android APK'
if: ${{ inputs.android_output == 'apk' }}
# Build APK version of the app
run: flutter build apk --split-per-abi
- name: 'Save APK'
if: ${{ inputs.android_output == 'apk' }}
uses: actions/upload-artifact@v3
with:
name: 'apk-build'
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk
- name: 'Generate build number'
if: ${{ inputs.android_output == 'aab' }}
# Build App Bundle version of the app
run: |
BUILD_NUMBER=$(git rev-list --all --count)
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
echo "This build is tagged as $BUILD_NUMBER on $GITHUB_REF"
- name: 'Build Android App Bundle'
if: ${{ inputs.android_output == 'aab' }}
run: flutter build appbundle --build-number="$BUILD_NUMBER"
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: 'Save AAB'
if: ${{ inputs.android_output == 'aab' }}
uses: actions/upload-artifact@v3
with:
name: 'aab-build'
path: build/app/outputs/bundle/release/app-release.aab
build_ios:
name: 'iOS'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
build_web:
name: 'WEB'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.passphrase }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: '🥺'
run: echo 'WIP'
33 changes: 30 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,34 @@ include: package:flutter_lints/flutter.yaml
linter:
rules:
prefer_single_quotes: true
use_build_context_synchronously: false

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
plugins:
- dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-parameters: 5
maximum-nesting-level: 5
metrics-exclude:
- test/**
rules:
- avoid-dynamic
- avoid-passing-async-when-sync-expected
- avoid-redundant-async
- avoid-unnecessary-type-assertions
- avoid-unnecessary-type-casts
- avoid-unrelated-type-assertions
- avoid-nested-conditional-expressions:
acceptable-level: 2
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions:
ignore-nested: true
- no-equal-then-else
- prefer-moving-to-variable:
allowed-duplicated-chains: 3
- prefer-match-file-name
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>


<queries>
Expand Down
2 changes: 1 addition & 1 deletion lib/app_theme.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class AppThemes {
class AppTheme {
static final lightTheme = ThemeData.light(
useMaterial3: true,
).copyWith(
Expand Down
Loading

0 comments on commit a5ee109

Please sign in to comment.