From 1cb42f9dbc8bd7388588f84199297041c02cff29 Mon Sep 17 00:00:00 2001 From: "Abd El-Twab M. Fakhry" Date: Sun, 5 Feb 2023 21:35:15 +0200 Subject: [PATCH] Split apk per abi to reduce apk size - Bump version to v0.3.3 - Fix typo in alarm settings --- .github/workflows/release.yaml | 4 ++-- .gitignore | 1 - .vscode/settings.json | 3 +++ android/app/build.gradle | 19 +++++++++++++++++++ lib/screens/about.dart | 3 ++- lib/utils/location.dart | 4 +--- pubspec.yaml | 2 +- 7 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index df38b5e..21076a9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,12 +29,12 @@ jobs: run: | build_number=$(awk -F+ '/version:/ {print $2}' pubspec.yaml) echo $build_number - flutter build apk --build-name=${{github.ref_name}} --build-number=$build_number --release + flutter build apk --split-per-abi --build-name=${{github.ref_name}} --build-number=$build_number --release - name: Release artifacts and source code uses: ncipollo/release-action@v1 with: - artifacts: build/app/outputs/flutter-apk/app-release.apk + artifacts: build/app/outputs/flutter-apk/* name: ${{github.ref_name}} makeLatest: true generateReleaseNotes: true diff --git a/.gitignore b/.gitignore index 1e55978..56570b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ migrate_working_dir/ .metadata pubspec.lock -.vscode # IntelliJ related *.iml diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d7d2716 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": "flutter_sdk" +} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index c6c5c27..b4ad629 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -60,6 +60,25 @@ android { signingConfig signingConfigs.debug } } + splits { + // Configures multiple APKs based on ABI. + abi { + // Enables building multiple APKs per ABI. + enable true + + // By default all ABIs are included, so use reset() and include to specify that we only + // want APKs for x86 and x86_64. + + // Resets the list of ABIs that Gradle should create APKs for to none. + reset() + + // Specifies a list of ABIs that Gradle should create APKs for. + include "x86", "x86_64", "armeabi", "armeabi-v7a", "arm64-v8a" + + // Specifies that we do not want to also generate a universal APK that includes all ABIs. + universalApk true + } + } } flutter { diff --git a/lib/screens/about.dart b/lib/screens/about.dart index 542a72f..d4bc139 100644 --- a/lib/screens/about.dart +++ b/lib/screens/about.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:loc/styles/colors.dart'; import 'package:url_launcher/url_launcher.dart'; -const String version = 'v0.3.2'; +const String version = 'v0.3.3'; class AboutScreen extends StatelessWidget { const AboutScreen({super.key}); @@ -173,6 +173,7 @@ class AboutScreen extends StatelessWidget { top: 8, left: 8, right: 8, + bottom: 16, ), decoration: const BoxDecoration( color: AppColors.ashGray, diff --git a/lib/utils/location.dart b/lib/utils/location.dart index 3abebe2..5a4de53 100644 --- a/lib/utils/location.dart +++ b/lib/utils/location.dart @@ -88,9 +88,7 @@ bool shouldPlaySound(BuildContext context) { if (isInRange(context) == true) { FlutterRingtonePlayer.playAlarm( - looping: true, - volume: 0.1, - asAlarm: true, + volume: 1.0, ); return true; } else { diff --git a/pubspec.yaml b/pubspec.yaml index 25ef9cb..1beb8f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Free and open-spurce location-based reminder for Android publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.3.2+32 +version: 0.3.3+33 environment: sdk: '>=2.18.6 <3.0.0'