Skip to content

Commit b7f82eb

Browse files
committed
Inject flutter compilation defaults for plugin subprojects
Plugins like geolocator_android reference flutter.compileSdkVersion during Gradle evaluation before the Flutter tooling injects it. Provide a fallback ext property map so the build.gradle resolves.
1 parent ef90890 commit b7f82eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

flutter_app/android/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ rootProject.buildDir = "../build"
99

1010
subprojects {
1111
project.buildDir = "${rootProject.buildDir}/${project.name}"
12+
// Provide flutter compilation defaults for plugins whose build.gradle
13+
// references flutter.compileSdkVersion before the Flutter tooling injects it.
14+
if (project.name != "app") {
15+
project.ext.set("flutter", [
16+
compileSdkVersion: 35,
17+
minSdkVersion: 29,
18+
targetSdkVersion: 36
19+
])
20+
}
1221
}
1322

1423
subprojects {

0 commit comments

Comments
 (0)