From 3dc695eafbb214b395aace610bbfa5f1cba08a20 Mon Sep 17 00:00:00 2001 From: validcube Date: Fri, 6 Sep 2024 21:06:58 +0700 Subject: [PATCH] fix: Reland commit 01e4a76caa06b4ab7934cc786ca57204501dd983 Amended: Remove secret @ Fri Sep 6 21:06:58 2024 +0700 Signed-off-by: validcube --- android/build.gradle | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 7a3d41af..8fd19bd4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,7 +15,30 @@ allprojects { } rootProject.buildDir = '../build' +// TODO: Bump SDK +// Reference: https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697 subprojects { + afterEvaluate { project -> + if (project.extensions.findByName("android") != null) { + Integer pluginCompileSdk = project.android.compileSdk + if (pluginCompileSdk != null && pluginCompileSdk < 31) { + project.logger.error( + "Warning: Overriding compileSdk version in Flutter plugin: " + + project.name + + " from " + + pluginCompileSdk + + " to 31 (to work around https://issuetracker.google.com/issues/199180389)." + + "\nIf there is not a new version of " + project.name + ", consider filing an issue against " + + project.name + + " to increase their compileSdk to the latest (otherwise try updating to the latest version)." + ) + project.android { + compileSdk 31 + } + } + } + } + project.buildDir = "${rootProject.buildDir}/${project.name}" project.evaluationDependsOn(":app") }