File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2014 The Flutter Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
1
include ' :app'
6
2
7
- def localPropertiesFile = new File (rootProject. projectDir, " local.properties" )
8
- def properties = new Properties ()
3
+ def flutterProjectRoot = rootProject. projectDir. parentFile. toPath()
9
4
10
- assert localPropertiesFile. exists()
11
- localPropertiesFile. withReader(" UTF-8" ) { reader -> properties. load(reader) }
5
+ def plugins = new Properties ()
6
+ def pluginsFile = new File (flutterProjectRoot. toFile(), ' .flutter-plugins' )
7
+ if (pluginsFile. exists()) {
8
+ pluginsFile. withReader(' UTF-8' ) { reader -> plugins. load(reader) }
9
+ }
12
10
13
- def flutterSdkPath = properties. getProperty(" flutter.sdk" )
14
- assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
15
- apply from : " $flutterSdkPath /packages/flutter_tools/gradle/app_plugin_loader.gradle"
11
+ plugins. each { name, path ->
12
+ def pluginDirectory = flutterProjectRoot. resolve(path). resolve(' android' ). toFile()
13
+ include " :$name "
14
+ project(" :$name " ). projectDir = pluginDirectory
15
+ }
You can’t perform that action at this time.
0 commit comments