Revert "flutter.gradle: collect list of Android plugins from .flutter-plugins-dependencies (#59294)" (#59810)
This reverts commit 947b48e062b6f2f00aa2f2b995677c0e101ab12d.
This commit is contained in:
parent
947b48e062
commit
e72d26a720
@ -372,27 +372,17 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Properties getPluginList() {
|
private Properties getPluginList() {
|
||||||
|
File pluginsFile = new File(project.projectDir.parentFile.parentFile, '.flutter-plugins')
|
||||||
|
Properties allPlugins = readPropertiesIfExist(pluginsFile)
|
||||||
Properties androidPlugins = new Properties()
|
Properties androidPlugins = new Properties()
|
||||||
|
allPlugins.each { name, path ->
|
||||||
def flutterProjectRoot = project.projectDir.parentFile.parentFile
|
if (doesSupportAndroidPlatform(path)) {
|
||||||
def pluginsFile = new File(flutterProjectRoot, '.flutter-plugins-dependencies')
|
androidPlugins.setProperty(name, path)
|
||||||
if (!pluginsFile.exists()) {
|
|
||||||
return androidPlugins
|
|
||||||
}
|
}
|
||||||
|
// TODO(amirh): log an error if this plugin was specified to be an Android
|
||||||
def object = new JsonSlurper().parseText(pluginsFile.text)
|
// plugin according to the new schema, and was missing a build.gradle file.
|
||||||
assert object instanceof Map
|
// https://github.com/flutter/flutter/issues/40784
|
||||||
assert object.plugins instanceof Map
|
|
||||||
assert object.plugins.android instanceof List
|
|
||||||
// Includes the Flutter plugins that support the Android platform.
|
|
||||||
object.plugins.android.each { androidPlugin ->
|
|
||||||
assert androidPlugin.name instanceof String
|
|
||||||
assert androidPlugin.path instanceof String
|
|
||||||
def pluginDirectory = new File(androidPlugin.path, 'android')
|
|
||||||
assert pluginDirectory.exists()
|
|
||||||
androidPlugins.setProperty(androidPlugin.name, androidPlugin.path)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return androidPlugins
|
return androidPlugins
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user