Member-only story
Configuring a Flutter Project with Firebase and Gradle Plugins
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:
- Setting up
android/build.gradle
- Configuring
android/app/build.gradle
- Managing plugins in
settings.gradle
- Enabling resource shrinking and minification
- Ensuring ProGuard rules are in place