Added a warning if flutter.groovy uses a .flutter-plugins file. (#157388)

Work towards https://github.com/flutter/flutter/issues/48918.

This file was soft deprecated in _2020_, but the code was never removed. This warning message will serve as a warning and we'll rip out support for `flutter-plugins` after the _next_ stable release (i.e. after the mid-November branch cut).
This commit is contained in:
Matan Lurey 2024-10-24 09:25:09 -07:00 committed by GitHub
parent cc86b703ce
commit 25b55b9f2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -688,6 +688,10 @@ class FlutterPlugin implements Plugin<Project> {
} catch (FileNotFoundException ignored) {
throw new GradleException("settings.gradle/settings.gradle.kts does not exist: ${settingsGradleFile(project).absolutePath}")
}
// TODO(matanlurey): https://github.com/flutter/flutter/issues/48918.
project.logger.quiet("Warning: This project is still reading the deprecated '.flutter-plugins. file.")
project.logger.quiet("In an upcoming stable release support for this file will be completely removed and your build will fail.")
project.logger.quiet("See https:/flutter.dev/to/flutter-plugins-configuration.")
List<Map<String, Object>> deps = getPluginDependencies(project)
List<String> plugins = getPluginList(project).collect { it.name as String }
deps.removeIf { plugins.contains(it.name) }