Skip to content

Commit 056c40f

Browse files
authored
Make the Flutter Gradle Plugin apply FlutterExtension to (flutter) plugins (#151861)
Makes the Flutter Gradle Plugin apply the `FlutterExtension` (the class that vends `flutter.minSdkVersion`, etc) to Flutter plugins. This allows plugin authors to use `flutter.compileSdkVersion` and the like in plugin `build.gradle` files. Doesn't use it in templates yet - holding off till we can see how this works in the plugins repo (which will sadly have to wait till this makes the next stable � )
1 parent 40f763a commit 056c40f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/flutter_tools/gradle/src/main/groovy/flutter.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,9 @@ class FlutterPlugin implements Plugin<Project> {
765765
if (pluginProject == null) {
766766
return
767767
}
768+
// Apply the "flutter" Gradle extension to plugins so that they can use it's vended
769+
// compile/target/min sdk values.
770+
pluginProject.extensions.create("flutter", FlutterExtension)
768771
// Add plugin dependency to the app project.
769772
project.dependencies {
770773
api(pluginProject)

0 commit comments

Comments
 (0)