Skip to content

Commit

Permalink
fix: Bump SDK of each plugin using SDK lower than 31
Browse files Browse the repository at this point in the history
Reference: flutter/flutter#153281 (comment)
Signed-off-by: validcube <pun.butrach@gmail.com>
  • Loading branch information
validcube committed Sep 6, 2024
1 parent 59838a5 commit 01e4a76
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,32 @@ 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}"
}
subprojects {
project.evaluationDependsOn(':app')
project.evaluationDependsOn(":app")
}

tasks.register("clean", Delete) {
Expand Down

0 comments on commit 01e4a76

Please sign in to comment.