build: Add android build workaround for new flutter version

pull/1503/head rc1.23.0-3
Krille 7 months ago
parent ae0999e6ce
commit ef85d48a47
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -6,11 +6,34 @@ allprojects {
}
rootProject.buildDir = '../build'
// Workaround for building with Flutter 3.24
// See: https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
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
}
}
}
}
}
subprojects {
project.evaluationDependsOn(':app')
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {

Loading…
Cancel
Save