@@ -372,28 +372,17 @@ class FlutterPlugin implements Plugin<Project> {
372
372
}
373
373
374
374
private Properties getPluginList () {
375
-
375
+ File pluginsFile = new File (project. projectDir. parentFile. parentFile, ' .flutter-plugins' )
376
+ Properties allPlugins = readPropertiesIfExist(pluginsFile)
376
377
Properties androidPlugins = new Properties ()
377
-
378
- def flutterProjectRoot = project. projectDir. parentFile. parentFile
379
- def pluginsFile = new File (flutterProjectRoot, ' .flutter-plugins-dependencies' )
380
- if (! pluginsFile. exists()) {
381
- return androidPlugins
382
- }
383
-
384
- def object = new JsonSlurper (). parseText(pluginsFile. text)
385
- assert object instanceof Map
386
- assert object. plugins instanceof Map
387
- assert object. plugins. android instanceof List
388
- // Includes the Flutter plugins that support the Android platform.
389
- object. plugins. android. each { androidPlugin ->
390
- assert androidPlugin. name instanceof String
391
- assert androidPlugin. path instanceof String
392
- def pluginDirectory = new File (androidPlugin. path, ' android' )
393
- assert pluginDirectory. exists()
394
- androidPlugins. setProperty(androidPlugin. name, androidPlugin. path)
378
+ allPlugins. each { name , path ->
379
+ if (doesSupportAndroidPlatform(path)) {
380
+ androidPlugins. setProperty(name, path)
381
+ }
382
+ // TODO(amirh): log an error if this plugin was specified to be an Android
383
+ // plugin according to the new schema, and was missing a build.gradle file.
384
+ // https://github.com/flutter/flutter/issues/40784
395
385
}
396
-
397
386
return androidPlugins
398
387
}
399
388
0 commit comments