Member-only story

Configuring a Flutter Project with Firebase and Gradle Plugins

Michael Cockinos
3 min readJul 12, 2024

--

Some of you may have seen this when running ~% flutter build apk or appbundle

Deprecated imperative apply of Flutter’s Gradle plugins

flutter needs upgrade: 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

After a lot of trial and error, I finally came up with a solution where the Gradle files compile without errors when running ./gradlew clean.

Reference: Flutter Gradle Plugin Apply

Here’s how it’s done!

This tutorial will guide you through configuring a Flutter project with necessary Gradle plugins and Firebase dependencies, ensuring a successful setup without errors.

Topics Covered:

  1. Setting up android/build.gradle
  2. Configuring android/app/build.gradle
  3. Managing plugins in settings.gradle
  4. Enabling resource shrinking and minification
  5. Ensuring ProGuard rules are in place

Prerequisites:

--

--

Michael Cockinos
Michael Cockinos

Written by Michael Cockinos

In the It industry since 2000. Code in ASP, HTML, dart flutter and loads of other flavours... Host websites, redhot.com.au

No responses yet