Suggest Migration to Declarative Plugin DSL in Android Gradle Build
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, flutter
- 领域
- build-system, mobile
调研方向
阅读链接的 Flutter 迁移文档,然后检查 android/settings.gradle 和 android/app/build.gradle,以比较当前应用 legacy plugin 的方式与提议的声明式结构。完成标准是:在这些文件中,plugin management 和 plugins 块替代 legacy 的 buildscript 和 apply plugin 用法。
由索引模型根据 Issue 内容生成。
描述
Feature Suggestion
Feature Description
I would like to suggest an update for the Android Gradle build configuration within the Firebase Quickstart Flutter project to utilize Gradle's declarative Plugin DSL, moving away from the legacy imperative apply script method. This suggestion aligns with the best practices recommended by Flutter from version 3.16 onwards and aims to enhance build configuration maintainability and facilitate easier future enhancements.
Why Is This Change Important?
- Adherence to Best Practices: According to Flutter's official documentation, the recommended approach for applying Gradle plugins in Flutter projects is now through the declarative Plugin DSL. Adopting this method would ensure the project remains up-to-date with Flutter's best practices.
- Improved Maintainability: By utilizing the Plugin DSL, the project's Gradle plugin management becomes cleaner and more straightforward, improving the overall maintainability of the build configuration.
- Future-Proofing: Preparing the project for potential future updates that could leverage new Gradle features, possibly including the adoption of Kotlin for Gradle scripts.
Proposed Changes
The update would involve modifications to the android/settings.gradle and android/app/build.gradle files to define and apply plugins using the declarative syntax. The key adjustments include:
- Implementing the
pluginManagementandplugins {}blocks insettings.gradlefor managing plugin versions and applications. - Eliminating the legacy
buildscriptblocks and replacing imperativeapply plugin:commands with the declarativeplugins {}block inapp/build.gradle.
- 主要语言
- Dart
- 星标
- 199
- 派生
- 75
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/quickstart-flutter 的其他 Issue
-
难度 5/5 一周以上 新手友好度 10/100
firebase/quickstart-flutter#116 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
firebase/quickstart-flutter#115 ·
-
ExecutionException: java.lang.NullPointerException: Firebase Messaging component is not present, 未关闭
难度 4/5 3-5 天 新手友好度 20/100
firebase/quickstart-flutter#88 · 1 条评论 ·
-
firebase/quickstart-flutter#13 · 已指派 1 人 ·
查看 firebase/quickstart-flutter 的全部 Issue
相似的 Issue
-
bug triage
难度 2/5 1-3 小时 新手友好度 70/100
fluttercommunity/plus_plugins#3979 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
from.page-issue
难度 1/5 1 小时以内 新手友好度 85/100
-
enhancement UI: Material
难度 2/5 1-3 小时 新手友好度 75/100
Notsfsssf/pixez-flutter#1360 ·
-
triage
难度 2/5 1-3 小时 新手友好度 70/100