flutter-template icon indicating copy to clipboard operation
flutter-template copied to clipboard

chore: Migrated to android gradle plugin

Open utpal-barman opened this issue 1 year ago • 3 comments

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.

utpal-barman avatar Apr 18 '24 17:04 utpal-barman

Great call @utpal-barman. Regarding NStack, I think we should plan something for Pritam to perform the migration.

nivisi avatar Apr 23 '24 09:04 nivisi

@utpal-barman did you try to build an apk after these changes?

hassan-saleh-ml avatar Apr 23 '24 10:04 hassan-saleh-ml

@hassan-saleh-ml Yes I tried to build

To make sure again just tried now on this branch —

Screenshot 2024-04-23 at 4 05 42 PM

@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

utpal-barman avatar Apr 23 '24 10:04 utpal-barman