chore: Migrated to android gradle plugin
General
Currently while running on the Android app, it's showing a message on the console to migrate to the Android Gradle Plugin block instead of the deprecated apply script method
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
Additionally The latest Flutter 3.19.5 • channel stable — suggests using the newer version of the Gradle version.
To migrate into the Gradle plugins with the declarative plugins block, android platform codes were regenerated by running the flutter create . platforms=android, so gradle versions were replaced by the latest flutter version.
⚠️ Blocker and Solution
Currently, there is a blocker to migrate this task, nstack plugin is using an old gradle version without a namespace field in android block, though it was overridden to overcome this issue
Checklists
- [x] Platform specific changes (input, image picking etc) are tested on both of the platforms (Android and iOS)
- [x] It is tested that the UI changes are rendered correctly on different device sizes (such as long lists or expanded rows) with safe area conditions.
- [x] Edge cases, such as responses being empty or invalid, missing data, no internet connection etc, are tested and the app works as expected.
Showcase
- [x] Either showcase screenshots / videos are attached, or this PR does not require such any showcase.
Great call @utpal-barman. Regarding NStack, I think we should plan something for Pritam to perform the migration.
@utpal-barman did you try to build an apk after these changes?
@hassan-saleh-ml Yes I tried to build
To make sure again just tried now on this branch —
@nivisi Yes, updating NStack is a must now, I can see Hassan already opened a draft PR there https://github.com/nstack-io/flutter-sdk/pull/57