Fix: Modernized Android Build System, Refactored Authentication Flow, and Upgraded Entire Dependency Stack #853
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the Android build failure caused by deprecated Gradle plugin configurations and modernizes the project's entire dependency stack. The build system has been updated to comply with current Flutter and Gradle standards, and all packages have been brought up to their latest stable versions.
Proposed Changes
Build System Modernization:
android/settings.gradleandandroid/build.gradlefrom deprecated imperative plugin loading (apply script) to modern declarativeplugins {}blockcompileSdkVersionfrom 34 to 36flutterRootSDK path resolution (now handled automatically)build.gradleGoogle Sign-In Refactor:
google_sign_in ^7.2.0GoogleSignIn.instance.initialize()andauthenticate()flowauthenticationEventsstream for better state managementauthorizationClient.authorizeScopes()Firebase & Cloud Dependencies:
firebase_corefrom 2.27.0 to 4.1.1firebase_authfrom 4.17.8 to 6.1.0firebase_messagingfrom 14.7.19 to 16.0.2cloud_firestorefrom 4.4.5 to 6.0.2googleapisfrom 13.1.0 to 15.0.0googleapis_authfrom 1.4.1 to 2.0.0extension_google_sign_in_as_googleapis_authfrom 2.0.12 to 3.0.0Package Updates (Major Versions):
get: 4.6.6 → 4.7.2intl: 0.18.0 → 0.20.2flutter_map: 4.0.0 → 8.2.2latlong2: 0.8.1 → 0.9.1fl_location: 2.0.0+1 → 5.0.0flutter_fgbg: 0.3.0 → 0.7.1flutter_secure_storage: 8.0.0 → 9.2.4weather: 2.0.1 → 3.2.1shake: 2.2.0 → 3.0.0mobile_scanner: 3.5.5 → 7.1.2permission_handler: 11.0.1 → 12.0.1flutter_expandable_fab: 1.8.1 → 2.5.2vibration: 1.8.1 → 3.1.4file_picker: 6.1.1 → 10.3.3audioplayers: 5.2.1 → 6.5.1sensors_plus: 1.4.1 → 6.1.2rxdart: 0.27.7 → 0.28.0fluttertoast: 8.2.5 → 9.0.0audio_session: 0.1.18 → 0.2.2android_intent_plus: 5.0.2 → 6.0.0flutter_lints: 4.0.0 → 6.0.0Code Quality & Bug Fixes:
StateErrorcrash innotification_icon.dartby adding comprehensive null safety checkssnapshot.hasError,snapshot.hasData,snapshot.data!.exists,data.containsKey()flutter_mapusage to new API (initialCenterandinitialZoominstead of deprecatedcenterandzoom)Markerwidget to usechildproperty instead of deprecatedbuilderflutter_fgbgusage to useFGBGEvents.instance.streaminstead of deprecatedFGBGEvents.streamshakedetector callback signature to acceptShakeEventparameterAudioContextto be non-const as required by neweraudioplayerspackageConfiguration Updates:
build.gradle.gitignoreto include.build/and.swiftpm/directoriesFixes #852
Testing Notes
Screenshots
Note on Scope and Testing
Fixing the initial Android build failure (caused by the deprecated Gradle plugin method) required updating the core Android build system (Gradle, Kotlin, SDK versions). This modernization naturally led to a comprehensive update across Flutter dependencies in
pubspec.yaml, as many packages needed to align with the newer build toolchain.This brings the project fully up-to-date with current tooling and dependency versions.
I've performed testing across different phone and tablet emulators and physical devices, covering core functionality and areas touched by the updated packages:
The testing confirms all major features are functioning as expected. As with any dependency update, additional validation on edge cases or specific device configurations during code review is always beneficial. I'm available to address any feedback or questions during the review process.
Note
The updates in the macos/ and ios/ directories (including Podfile, .xcodeproj, and related build configurations) were automatically generated after upgrading Flutter dependencies and re-running CocoaPods integration (flutter pub get → pod install).
These changes were not manual edits but were required to ensure compatibility with updated package versions and the latest macOS deployment target.
Checklist