skip to Main Content

When a new flutter project is created, the project-level and app-level build.gradle files are created. The settings.gradle contains the plugins to be applied at app level and project level.For my flutter version 3.24.2, the settings.gradle contains the below plugins :

plugins {
 id "dev.flutter.flutter-plugin-loader" version "1.0.0"
 id "com.android.application" version "7.3.0" apply false
 id "org.jetbrains.kotlin.android" version "1.7.10" apply false
 }

Here, my android gradle plugin (AGP) version is 7.3.0 and the kotlin gradle plugin (KGP) is 1.7.10. And these plugins are applied at the app level. For other parts of the project, I checked in the flutter/packages/flutter_tools/lib/src/android/gradle_utils.dart,where AGP 8.1.0 and KGP 1.8.22 are used.

    const String templateDefaultGradleVersion = '8.3';
    const String templateAndroidGradlePluginVersion = '8.1.0';
    const String templateAndroidGradlePluginVersionForModule = '7.3.0';
    const String templateKotlinGradlePluginVersion = '1.8.22';

Is it good to go with default values for app level AGP and KGP or will there be any scenario where we need to update these values.

2

Answers


  1. I think it is ok to go with default settings. But if you see exceptions and error or crashing while building the app you can change it according to message.

    Login or Signup to reply.
  2. If you are using Android Studio, open the android folder in Android studio, if your Plugins are out of date, there will be a pop-up on bottom right, that will help you migrate your plugins,

    It is also true if you want to upgrade target sdk version
    check out this image here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search