ultimate_alarm_clock icon indicating copy to clipboard operation
ultimate_alarm_clock copied to clipboard

Feature: Upgrade to plugins DSL syntax of gradle

Open Mastermind-sap opened this issue 11 months ago • 5 comments

Description

The project doesnot build with Flutter version 3.29.0 (channel stable) due to the error: You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is not possible anymore. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

Upgrading the gradle syntax will make it support updated versions of flutter.

Already resolved this in CCExtractor/taskwarrior-flutter repo.

Screenshots

Image

Mastermind-sap avatar Feb 22 '25 20:02 Mastermind-sap

The issue has been resolved by adjusting the environment settings. No code modifications were needed.

If you encounter the following error while building your Flutter project:

FAILURE: Build failed with an exception. ...

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is not possible anymore. Migrate to applying Gradle plugins with the declarative plugins block.

Follow these steps to resolve the issue:

  1. Downgrade Flutter to version 3.22.2:
  2. Uninstall Android Studio completely from your system.
  3. Install Koala 2024.1.2.8 as a replacement for Android Studio.
  4. Ensure you are using Java 17: If you have any other Java versions installed (higher or lower), uninstall them. Download and install Java 17 Set Java 17 as the default version by configuring the environment variables
  5. Restart your computer after installation.
  6. Navigate to your Flutter project directory and run:
flutter pub get
flutter run

Important Note: 🔴 Do not upgrade the dependencies after running flutter pub get, as it may cause compatibility issues.

Now Please Close this issue!!

Ni1esh-Yadav avatar Feb 27 '25 07:02 Ni1esh-Yadav

Hello @Ni1esh-Yadav I know downgrading the entire environment would run the project. That is why I have raised the issue to make it compatible with the current stable version of flutter. Downgrading the entire environment is not the solution but the problem. It also makes contributing to the project inconvenient as one needs to downgrade his entire setup to make it run. Now if the repo maintainers think that is not required, they can close this issue. Thank you.

Mastermind-sap avatar Feb 27 '25 08:02 Mastermind-sap

@Mastermind-sap You can raise a PR for this. But updating to the later versions of flutter has a bit more dependency with third party packages. So, this alone will not enable us to migrate to latest version of Flutter.

MarkisDev avatar Mar 01 '25 13:03 MarkisDev

@MarkisDev Ok I will start working on it.

Mastermind-sap avatar Mar 01 '25 14:03 Mastermind-sap

@MarkisDev I have fixed and raised a PR.

Mastermind-sap avatar Mar 01 '25 22:03 Mastermind-sap