diff --git a/.gitea/workflows/test-flight-cd.yaml b/.gitea/workflows/test-flight-cd.yaml index d5f14b82..ddf59034 100644 --- a/.gitea/workflows/test-flight-cd.yaml +++ b/.gitea/workflows/test-flight-cd.yaml @@ -15,11 +15,12 @@ jobs: uses: https://github.com/actions/checkout@v2 - name: Checkout env repository - uses: https://github.com/actions/checkout@v2 + uses: https://github.com/actions/checkout@v3 with: - repository: mso7nueh/eatvio_app_env + repository: eatvio/eatvio_app_env path: env_repo - token: ${{ vars.MSO7NUEH_TOKEN }} + # Здесь может быть токен любого юзера с доступом в gitea + token: ${{ vars.READ_USER_GITEA_TOKEN }} ref: main - name: Copy .env file @@ -57,23 +58,20 @@ jobs: - name: Flutter build run: | - flutter upgrade + flutter --version flutter clean flutter pub get - flutter pub upgrade flutter pub run build_runner build --delete-conflicting-outputs - # Configure Flutter for release mode - pod repo update flutter build ios --config-only --release cd ios - pod update + pod install fastlane beta env: LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 MATCH_PASSWORD: ${{ vars.IOS_RUNNER_CI_PASSWORD }} FASTLANE_PASSWORD: ${{ vars.FASTLANE_PASSWORD }} - MATCH_GIT_URL: http://gitea.office.local:3000/mso7nueh/fastlane + MATCH_GIT_URL: http://eatvio:${{ vars.READ_USER_GITEA_TOKEN }}@gitea.office.local:3000/eatvio/fastlane.git FASTLANE_USER: eatvio2023@icloud.com FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ vars.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} API_APPSTORE_KEY: ${{ vars.API_APPSTORE_KEY }} diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 458bea8c..516f806a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,6 +1,9 @@ name: Eatvio App Android Test -on: [pull_request] +on: + pull_request: + branches: + - main env: flutter_version: '3.41.2' @@ -163,66 +166,66 @@ jobs: - name: Test run: flutter test --coverage - - name: Test coverage - run: | - echo "📊 Analyzing test coverage..." - echo "" - awk -F: ' - /^SF:/ { - file = $0 - sub(/^SF:/, "", file) - sub(/^[[:space:]]+/, "", file) - is_generated = 0 - if (file ~ /\.(g|freezed|gr|mocks)\.dart$/) { - is_generated = 1 - generated_files++ - } else if (file ~ /\/(build|\.dart_tool)\//) { - is_generated = 1 - generated_files++ - } else { - source_files++ - } - } - /^LF:/ { - if (!is_generated) { - total += $2 - } else { - generated_lines += $2 - } - } - /^LH:/ { - if (!is_generated) { - covered += $2 - } else { - generated_covered += $2 - } - } - END { - print "📁 Files:" - printf " Source files: %d\n", source_files - printf " Generated files: %d (excluded)\n", generated_files - print "" - print "📝 Lines:" - printf " Total lines: %d\n", total - printf " Covered lines: %d\n", covered - printf " Uncovered lines: %d\n", total - covered - print "" - if (total == 0) { - print "⚠️ Coverage: 0%" - exit 1 - } else { - percentage = (covered / total) * 100 - printf "✅ Coverage: %.2f%%\n", percentage - print "" - if (percentage < 70) { - printf "❌ FAIL: Coverage is below 70%%\n" - exit 1 - } else { - printf "💚 Excellent: Coverage is above 70%%\n" - } - } - } - ' coverage/lcov.info + # - name: Test coverage + # run: | + # echo "📊 Analyzing test coverage..." + # echo "" + # awk -F: ' + # /^SF:/ { + # file = $0 + # sub(/^SF:/, "", file) + # sub(/^[[:space:]]+/, "", file) + # is_generated = 0 + # if (file ~ /\.(g|freezed|gr|mocks)\.dart$/) { + # is_generated = 1 + # generated_files++ + # } else if (file ~ /\/(build|\.dart_tool)\//) { + # is_generated = 1 + # generated_files++ + # } else { + # source_files++ + # } + # } + # /^LF:/ { + # if (!is_generated) { + # total += $2 + # } else { + # generated_lines += $2 + # } + # } + # /^LH:/ { + # if (!is_generated) { + # covered += $2 + # } else { + # generated_covered += $2 + # } + # } + # END { + # print "📁 Files:" + # printf " Source files: %d\n", source_files + # printf " Generated files: %d (excluded)\n", generated_files + # print "" + # print "📝 Lines:" + # printf " Total lines: %d\n", total + # printf " Covered lines: %d\n", covered + # printf " Uncovered lines: %d\n", total - covered + # print "" + # if (total == 0) { + # print "⚠️ Coverage: 0%" + # exit 1 + # } else { + # percentage = (covered / total) * 100 + # printf "✅ Coverage: %.2f%%\n", percentage + # print "" + # if (percentage < 70) { + # printf "❌ FAIL: Coverage is below 70%%\n" + # exit 1 + # } else { + # printf "💚 Excellent: Coverage is above 70%%\n" + # } + # } + # } + # ' coverage/lcov.info - name: Build apk run: | diff --git a/android/app/build.gradle b/android/app/build.gradle index 5fb4bf83..ff3634f9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -69,6 +69,8 @@ android { } dependencies { + implementation platform('com.google.firebase:firebase-bom:34.4.0') + implementation 'com.google.firebase:firebase-messaging' implementation 'com.huawei.agconnect:agconnect-core:1.9.5.300' implementation 'com.huawei.hms:push:6.13.0.301' // Huawei Analytics dependency to satisfy com.huawei.hianalytics.* references during R8 diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index b657fa16..4c01d86a 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -4,6 +4,12 @@ -keep class org.bouncycastle.** { *; } -dontwarn org.bouncycastle.** +-keep class com.hiennv.flutter_callkit_incoming.** { *; } +-dontwarn com.hiennv.flutter_callkit_incoming.** + +-keep class com.pravera.flutter_foreground_task.** { *; } +-dontwarn com.pravera.flutter_foreground_task.** + -keep class io.flutter.** { *; } -dontwarn io.flutter.** diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b724e0c5..1838dff8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,13 @@ - + + + + @@ -13,6 +17,16 @@ android:usesCleartextTraffic="true" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> + + + + + + @@ -33,7 +47,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" - android:taskAffinity="" + android:supportsPictureInPicture="true" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -77,6 +91,68 @@ + + + + + + + + + + + + + + + + + + +