File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,37 @@ rootProject.buildDir = '../build'
9
9
subprojects {
10
10
project. buildDir = " ${ rootProject.buildDir} /${ project.name} "
11
11
}
12
+
13
+ // Workaround for APK builds - https://github.com/flutter/flutter/issues/153281
14
+ subprojects {
15
+ afterEvaluate { project ->
16
+ if (project. extensions. findByName(" android" ) != null ) {
17
+ Integer pluginCompileSdk = project. android. compileSdk
18
+ if (pluginCompileSdk != null && pluginCompileSdk < 31 ) {
19
+ project. logger. error(
20
+ " Warning: Overriding compileSdk version in Flutter plugin: "
21
+ + project. name
22
+ + " from "
23
+ + pluginCompileSdk
24
+ + " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
25
+ + " \n If there is not a new version of " + project. name + " , consider filing an issue against "
26
+ + project. name
27
+ + " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
28
+ )
29
+ project. android {
30
+ compileSdk 31
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+
12
37
subprojects {
13
38
project. evaluationDependsOn(' :app' )
14
39
}
15
40
41
+
42
+
16
43
tasks. register(" clean" , Delete ) {
17
44
delete rootProject. buildDir
18
45
}
You can’t perform that action at this time.
0 commit comments