Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[firebase_core, firebase_analytics, firebase_crashlytics, firebase_messaging, firebase_remote_config] Android: build.gradle uses Groovy space-assignment syntax (deprecated in Gradle 9, removed in Gradle 10)

Đã đóng Phù hợp với người mới
#18,832 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter
Lĩnh vực
build-system, devtools

Hướng nghiên cứu

Bắt đầu với các tệp android/build.gradle được liệt kê trong năm gói Firebase và tái hiện các cảnh báo bằng ./gradlew help --warning-mode all trên Gradle 9. Cập nhật các khai báo thuộc tính Groovy được báo cáo sang cú pháp gán, sau đó xác nhận các cảnh báo đã biến mất và các bản build vẫn tương thích với Gradle 8.x.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Needs Attention platform: android type: infrastructure umbrella

Describe the bug

On Gradle 9, every Android build of an app that depends on firebase_core / firebase_analytics / firebase_crashlytics / firebase_messaging / firebase_remote_config prints this deprecation for the plugin's android/build.gradle:

Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.

Docs: https://docs.gradle.org/9.3.1/userguide/upgrading_version_8.html#groovy_space_assignment_syntax

Once Gradle 10 removes the syntax, apps that use this plugin will fail to build on Android.

Where

firebase_core 5.0.0, android/build.gradle:

1: group 'io.flutter.plugins.firebase.core'
2: version '1.0-SNAPSHOT'
40:       namespace 'io.flutter.plugins.firebase.core'
61:         buildConfig true

firebase_analytics 13.0.0, android/build.gradle:

1: group 'io.flutter.plugins.firebase.analytics'
2: version '1.0-SNAPSHOT'
47:         namespace 'io.flutter.plugins.firebase.analytics'
68:         buildConfig true

firebase_crashlytics 6.0.0, android/build.gradle:

1: group 'io.flutter.plugins.firebase.crashlytics'
2: version '1.0-SNAPSHOT'
47:     namespace 'io.flutter.plugins.firebase.crashlytics'

firebase_messaging 17.0.0, android/build.gradle:

1: group 'io.flutter.plugins.firebasemessaging'
2: version '1.0-SNAPSHOT'
39:     namespace 'io.flutter.plugins.firebase.messaging'

firebase_remote_config 7.0.0, android/build.gradle:

1: group 'io.flutter.plugins.firebase.firebaseremoteconfig'
2: version '1.0-SNAPSHOT'
47:         namespace 'io.flutter.plugins.firebase.firebaseremoteconfig'

Expected behavior

Use assignment syntax, which already works on Gradle 8.x, so the change is backwards compatible:

group = '...'
version = '1.0'
namespace = '...'
buildConfig = true

To reproduce

Build any Flutter app that depends on the plugin with Gradle 9.x, using ./gradlew help --warning-mode all. The warnings point at the lines above.

Environment

Flutter 3.47.6, AGP 9.1.0, Gradle 9.3.1, Kotlin 2.3.21, JDK 17.

Ngôn ngữ chính
Dart
Star
9.3k
Fork
4.1k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
79

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/flutterfire

Tất cả issue của firebase/flutterfire

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.