From 1934dde81deda2a735fef3e6e07c099f5f094c2b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 25 Sep 2025 16:57:52 -0400 Subject: [PATCH 1/3] [various] Standardize gradle dependencies Standardizes dependencies in build.gradle files on using parentheses rather than space. This doesn't enforce this syntax via repo tool checks, since it's not critical (it just reduces future churn when switching to Kotlin), and eventually the switch to Kotlin will provide the enforcement. It does fix a latent issue where test-only dependency changes that used the () syntax wouldn't have been recognized by the tool as test-only changes for changelog/version check purposes. Part of https://github.com/flutter/flutter/issues/176065 --- .../camera/example/android/app/build.gradle | 8 +-- .../camera_android/android/build.gradle | 10 +-- .../example/android/app/build.gradle | 8 +-- .../android/build.gradle | 20 +++--- .../example/android/app/build.gradle | 8 +-- packages/espresso/README.md | 10 +-- packages/espresso/android/build.gradle | 40 ++++++------ .../espresso/example/android/app/build.gradle | 30 ++++----- .../android/build.gradle | 10 +-- .../example/android/app/build.gradle | 16 ++--- .../android/build.gradle | 6 +- .../example/android/app/build.gradle | 6 +- .../example/android/app/build.gradle | 10 +-- .../android/build.gradle | 20 +++--- .../example/android/app/build.gradle | 12 ++-- .../example/android/build.gradle | 2 +- .../example/android/app/build.gradle | 10 +-- .../android/build.gradle | 12 ++-- .../example/android/app/build.gradle | 10 +-- .../example/android/app/build.gradle | 8 +-- .../image_picker_android/android/build.gradle | 16 ++--- .../example/android/app/build.gradle | 12 ++-- .../example/android/app/build.gradle | 12 ++-- .../android/build.gradle | 18 ++--- .../example/android/app/build.gradle | 12 ++-- .../android/build.gradle | 16 ++--- .../example/android/app/build.gradle | 8 +-- .../example/android/app/build.gradle | 6 +- .../local_auth_android/android/build.gradle | 18 ++--- .../example/android/app/build.gradle | 6 +- .../example/android/app/build.gradle | 12 ++-- .../android/build.gradle | 4 +- .../example/android/app/build.gradle | 12 ++-- .../android/build.gradle | 4 +- .../test_plugin/android/build.gradle | 4 +- .../example/android/app/build.gradle | 8 +-- .../android/build.gradle | 6 +- .../example/android/app/build.gradle | 16 ++--- .../android/build.gradle | 18 ++--- .../example/android/app/build.gradle | 16 ++--- .../example/android/app/build.gradle | 6 +- .../url_launcher_android/android/build.gradle | 14 ++-- .../example/android/app/build.gradle | 6 +- .../example/android/app/build.gradle | 10 +-- .../video_player_android/android/build.gradle | 20 +++--- .../example/android/app/build.gradle | 18 ++--- .../example/android/build.gradle | 4 +- .../example/android/app/build.gradle | 8 +-- .../android/build.gradle | 12 ++-- .../example/android/app/build.gradle | 8 +-- .../lib/src/common/package_state_utils.dart | 2 +- .../test/common/package_state_utils_test.dart | 65 ++++++++++++++++++- .../tool/test/gradle_check_command_test.dart | 2 +- 53 files changed, 358 insertions(+), 297 deletions(-) diff --git a/packages/camera/camera/example/android/app/build.gradle b/packages/camera/camera/example/android/app/build.gradle index 7a71866cbca..b24c906760c 100644 --- a/packages/camera/camera/example/android/app/build.gradle +++ b/packages/camera/camera/example/android/app/build.gradle @@ -56,8 +56,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test:rules:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") } diff --git a/packages/camera/camera_android/android/build.gradle b/packages/camera/camera_android/android/build.gradle index ff2c0157444..e639fdc5c04 100644 --- a/packages/camera/camera_android/android/build.gradle +++ b/packages/camera/camera_android/android/build.gradle @@ -66,9 +66,9 @@ buildFeatures { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation 'org.robolectric:robolectric:4.15.1' + implementation("androidx.annotation:annotation:1.9.1") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } diff --git a/packages/camera/camera_android/example/android/app/build.gradle b/packages/camera/camera_android/example/android/app/build.gradle index 7a71866cbca..b24c906760c 100644 --- a/packages/camera/camera_android/example/android/app/build.gradle +++ b/packages/camera/camera_android/example/android/app/build.gradle @@ -56,8 +56,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test:rules:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") } diff --git a/packages/camera/camera_android_camerax/android/build.gradle b/packages/camera/camera_android_camerax/android/build.gradle index be5113a5489..521bff37d8d 100644 --- a/packages/camera/camera_android_camerax/android/build.gradle +++ b/packages/camera/camera_android_camerax/android/build.gradle @@ -73,14 +73,14 @@ android { dependencies { // CameraX core library using the camera2 implementation must use same version number. def camerax_version = "1.5.0" - implementation "androidx.camera:camera-core:${camerax_version}" - implementation "androidx.camera:camera-camera2:${camerax_version}" - implementation "androidx.camera:camera-lifecycle:${camerax_version}" - implementation "androidx.camera:camera-video:${camerax_version}" - implementation 'com.google.guava:guava:33.5.0-android' - testImplementation 'junit:junit:4.13.2' - testImplementation "org.mockito:mockito-core:5.19.0" - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation 'org.robolectric:robolectric:4.15.1' + implementation("androidx.camera:camera-core:${camerax_version}") + implementation("androidx.camera:camera-camera2:${camerax_version}") + implementation("androidx.camera:camera-lifecycle:${camerax_version}") + implementation("androidx.camera:camera-video:${camerax_version}") + implementation("com.google.guava:guava:33.5.0-android") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } diff --git a/packages/camera/camera_android_camerax/example/android/app/build.gradle b/packages/camera/camera_android_camerax/example/android/app/build.gradle index ff29b2f9982..a2bf84f9442 100644 --- a/packages/camera/camera_android_camerax/example/android/app/build.gradle +++ b/packages/camera/camera_android_camerax/example/android/app/build.gradle @@ -60,8 +60,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/espresso/README.md b/packages/espresso/README.md index 08c9b62c9d9..ecab75506c5 100644 --- a/packages/espresso/README.md +++ b/packages/espresso/README.md @@ -18,11 +18,11 @@ Add the following dependencies in android/app/build.gradle: ```groovy dependencies { - testImplementation 'junit:junit:4.13.2' - testImplementation "com.google.truth:truth:1.1.3" - androidTestImplementation 'androidx.test:runner:1.6.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' - api 'androidx.test:core:1.2.0' + testImplementation("junit:junit:4.13.2") + testImplementation("com.google.truth:truth:1.1.3") + androidTestImplementation("androidx.test:runner:1.6.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") + api("androidx.test:core:1.2.0") } ``` diff --git a/packages/espresso/android/build.gradle b/packages/espresso/android/build.gradle index a87c3ecd1a4..56a1b779dea 100644 --- a/packages/espresso/android/build.gradle +++ b/packages/espresso/android/build.gradle @@ -57,40 +57,40 @@ android { } dependencies { - implementation 'com.google.guava:guava:33.4.8-android' - implementation 'com.squareup.okhttp3:okhttp:5.1.0' - implementation 'com.google.code.gson:gson:2.13.2' - androidTestImplementation 'org.hamcrest:hamcrest:3.0' + implementation("com.google.guava:guava:33.4.8-android") + implementation("com.squareup.okhttp3:okhttp:5.1.0") + implementation("com.google.code.gson:gson:2.13.2") + androidTestImplementation("org.hamcrest:hamcrest:3.0") - testImplementation 'junit:junit:4.13.2' - testImplementation "com.google.truth:truth:1.4.5" - api 'androidx.test.espresso:espresso-core:3.7.0' + testImplementation("junit:junit:4.13.2") + testImplementation("com.google.truth:truth:1.4.5") + api("androidx.test.espresso:espresso-core:3.7.0") // Core library - api 'androidx.test:core:1.7.0' + api("androidx.test:core:1.7.0") // AndroidJUnitRunner and JUnit Rules - api 'androidx.test:runner:1.7.0' - api 'androidx.test:rules:1.7.0' + api("androidx.test:runner:1.7.0") + api("androidx.test:rules:1.7.0") // Assertions - api 'androidx.test.ext:junit:1.3.0' - api 'androidx.test.ext:truth:1.7.0' - api 'com.google.truth:truth:1.4.5' + api("androidx.test.ext:junit:1.3.0") + api("androidx.test.ext:truth:1.7.0") + api("com.google.truth:truth:1.4.5") // Espresso dependencies - api 'androidx.test.espresso:espresso-core:3.7.0' - api 'androidx.test.espresso:espresso-contrib:3.7.0' - api 'androidx.test.espresso:espresso-intents:3.7.0' - api 'androidx.test.espresso:espresso-accessibility:3.7.0' - api 'androidx.test.espresso:espresso-web:3.7.0' - api 'androidx.test.espresso.idling:idling-concurrent:3.7.0' + api("androidx.test.espresso:espresso-core:3.7.0") + api("androidx.test.espresso:espresso-contrib:3.7.0") + api("androidx.test.espresso:espresso-intents:3.7.0") + api("androidx.test.espresso:espresso-accessibility:3.7.0") + api("androidx.test.espresso:espresso-web:3.7.0") + api("androidx.test.espresso.idling:idling-concurrent:3.7.0") // The following Espresso dependency can be either "implementation" // or "androidTestImplementation", depending on whether you want the // dependency to appear on your APK's compile classpath or the test APK // classpath. - api 'androidx.test.espresso:espresso-idling-resource:3.7.0' + api("androidx.test.espresso:espresso-idling-resource:3.7.0") } diff --git a/packages/espresso/example/android/app/build.gradle b/packages/espresso/example/android/app/build.gradle index 4356e42b246..fddba8b151d 100644 --- a/packages/espresso/example/android/app/build.gradle +++ b/packages/espresso/example/android/app/build.gradle @@ -53,34 +53,34 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' + testImplementation("junit:junit:4.13.2") // Multidex - implementation "androidx.multidex:multidex:2.0.1" + implementation("androidx.multidex:multidex:2.0.1") // Core library - api 'androidx.test:core:1.6.1' + api("androidx.test:core:1.6.1") // AndroidJUnitRunner and JUnit Rules - androidTestImplementation 'androidx.test:runner:1.6.1' - androidTestImplementation 'androidx.test:rules:1.6.1' + androidTestImplementation("androidx.test:runner:1.6.1") + androidTestImplementation("androidx.test:rules:1.6.1") // Assertions - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.ext:truth:1.6.0' - androidTestImplementation 'com.google.truth:truth:1.1.3' + androidTestImplementation("androidx.test.ext:junit:1.2.1") + androidTestImplementation("androidx.test.ext:truth:1.6.0") + androidTestImplementation("com.google.truth:truth:1.1.3") // Espresso dependencies - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' - androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1' - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1' - androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.6.1' - androidTestImplementation 'androidx.test.espresso:espresso-web:3.6.1' - androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.6.1' + androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") + androidTestImplementation("androidx.test.espresso:espresso-contrib:3.6.1") + androidTestImplementation("androidx.test.espresso:espresso-intents:3.6.1") + androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.6.1") + androidTestImplementation("androidx.test.espresso:espresso-web:3.6.1") + androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.6.1") // The following Espresso dependency can be either "implementation" // or "androidTestImplementation", depending on whether you want the // dependency to appear on your APK's compile classpath or the test APK // classpath. - androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.6.1' + androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.6.1") } diff --git a/packages/file_selector/file_selector_android/android/build.gradle b/packages/file_selector/file_selector_android/android/build.gradle index 30180c1e2af..b85120154c3 100644 --- a/packages/file_selector/file_selector_android/android/build.gradle +++ b/packages/file_selector/file_selector_android/android/build.gradle @@ -35,11 +35,11 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation "org.robolectric:robolectric:4.15.1" + implementation("androidx.annotation:annotation:1.9.1") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } lintOptions { diff --git a/packages/file_selector/file_selector_android/example/android/app/build.gradle b/packages/file_selector/file_selector_android/example/android/app/build.gradle index e7ffeeb25ef..a7e69e039c2 100644 --- a/packages/file_selector/file_selector_android/example/android/app/build.gradle +++ b/packages/file_selector/file_selector_android/example/android/app/build.gradle @@ -55,12 +55,12 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0' - androidTestImplementation 'androidx.test:runner:1.4.0' - androidTestImplementation 'androidx.test:rules:1.4.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' - implementation project(':file_selector_android') - implementation project(':espresso') - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.espresso:espresso-intents:3.4.0") + androidTestImplementation("androidx.test:runner:1.4.0") + androidTestImplementation("androidx.test:rules:1.4.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") + implementation(project(':file_selector_android')) + implementation(project(':espresso')) + api("androidx.test:core:1.4.0") } diff --git a/packages/flutter_plugin_android_lifecycle/android/build.gradle b/packages/flutter_plugin_android_lifecycle/android/build.gradle index 8c044c779dc..fcc7786b455 100644 --- a/packages/flutter_plugin_android_lifecycle/android/build.gradle +++ b/packages/flutter_plugin_android_lifecycle/android/build.gradle @@ -43,7 +43,7 @@ android { } dependencies { - implementation "androidx.annotation:annotation:1.9.1" + implementation("androidx.annotation:annotation:1.9.1") } @@ -61,6 +61,6 @@ android { } dependencies { - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") } diff --git a/packages/flutter_plugin_android_lifecycle/example/android/app/build.gradle b/packages/flutter_plugin_android_lifecycle/example/android/app/build.gradle index 3c835ffaf03..d0c2f5654c8 100644 --- a/packages/flutter_plugin_android_lifecycle/example/android/app/build.gradle +++ b/packages/flutter_plugin_android_lifecycle/example/android/app/build.gradle @@ -55,7 +55,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle b/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle index 2debab676e6..50e9f777b14 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle @@ -54,11 +54,11 @@ android { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' - testImplementation 'com.google.android.gms:play-services-maps:17.0.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") + testImplementation("com.google.android.gms:play-services-maps:17.0.0") } namespace 'io.flutter.plugins.googlemapsexample' lint { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle index 040c38974be..dfd77a0858b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle @@ -36,16 +36,16 @@ android { } dependencies { - implementation "androidx.annotation:annotation:1.9.1" - implementation 'com.google.android.gms:play-services-maps:19.2.0' - implementation 'com.google.maps.android:android-maps-utils:3.6.0' - androidTestImplementation 'androidx.test:runner:1.7.0' - androidTestImplementation 'androidx.test:rules:1.7.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation "org.robolectric:robolectric:4.15.1" + implementation("androidx.annotation:annotation:1.9.1") + implementation("com.google.android.gms:play-services-maps:19.2.0") + implementation("com.google.maps.android:android-maps-utils:3.6.0") + androidTestImplementation("androidx.test:runner:1.7.0") + androidTestImplementation("androidx.test:rules:1.7.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } compileOptions { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/build.gradle index f868ce78c86..73cf7e7d5e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/android/app/build.gradle @@ -55,12 +55,12 @@ android { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' - testImplementation 'com.google.android.gms:play-services-maps:17.0.0' - testImplementation 'com.google.maps.android:android-maps-utils:3.6.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") + testImplementation("com.google.android.gms:play-services-maps:17.0.0") + testImplementation("com.google.maps.android:android-maps-utils:3.6.0") } lint { disable 'InvalidPackage' diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle index 98976c044c9..aba27e72d1e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle @@ -39,7 +39,7 @@ gradle.projectsEvaluated { // 'GuardedBy': class file for // javax.annotation.concurrent.GuardedBy not found dependencies { - implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation("com.google.code.findbugs:jsr305:3.0.2") } } } diff --git a/packages/google_sign_in/google_sign_in/example/android/app/build.gradle b/packages/google_sign_in/google_sign_in/example/android/app/build.gradle index 3c1e0dee00b..cf34cebecbd 100644 --- a/packages/google_sign_in/google_sign_in/example/android/app/build.gradle +++ b/packages/google_sign_in/google_sign_in/example/android/app/build.gradle @@ -57,9 +57,9 @@ flutter { } dependencies { - implementation 'com.google.android.gms:play-services-auth:16.0.1' - testImplementation'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + implementation("com.google.android.gms:play-services-auth:16.0.1") + testImplementation("junit:junit:4.12") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/google_sign_in/google_sign_in_android/android/build.gradle b/packages/google_sign_in/google_sign_in_android/android/build.gradle index 7ea2f885914..54afc72124b 100644 --- a/packages/google_sign_in/google_sign_in_android/android/build.gradle +++ b/packages/google_sign_in/google_sign_in_android/android/build.gradle @@ -67,10 +67,10 @@ android { } dependencies { - implementation 'androidx.credentials:credentials:1.5.0' - implementation 'androidx.credentials:credentials-play-services-auth:1.5.0' - implementation 'com.google.android.libraries.identity.googleid:googleid:1.1.1' - implementation 'com.google.android.gms:play-services-auth:21.4.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' + implementation("androidx.credentials:credentials:1.5.0") + implementation("androidx.credentials:credentials-play-services-auth:1.5.0") + implementation("com.google.android.libraries.identity.googleid:googleid:1.1.1") + implementation("com.google.android.gms:play-services-auth:21.4.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-inline:5.2.0") } diff --git a/packages/google_sign_in/google_sign_in_android/example/android/app/build.gradle b/packages/google_sign_in/google_sign_in_android/example/android/app/build.gradle index d4ecd0ece47..9dd67037efc 100644 --- a/packages/google_sign_in/google_sign_in_android/example/android/app/build.gradle +++ b/packages/google_sign_in/google_sign_in_android/example/android/app/build.gradle @@ -58,9 +58,9 @@ flutter { } dependencies { - implementation 'com.google.android.gms:play-services-auth:16.0.1' - testImplementation'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + implementation("com.google.android.gms:play-services-auth:16.0.1") + testImplementation("junit:junit:4.12") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/image_picker/image_picker/example/android/app/build.gradle b/packages/image_picker/image_picker/example/android/app/build.gradle index 937413b5629..7ab628075f0 100755 --- a/packages/image_picker/image_picker/example/android/app/build.gradle +++ b/packages/image_picker/image_picker/example/android/app/build.gradle @@ -58,8 +58,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/image_picker/image_picker_android/android/build.gradle b/packages/image_picker/image_picker_android/android/build.gradle index 106ace40ed0..ba99aabbd11 100644 --- a/packages/image_picker/image_picker_android/android/build.gradle +++ b/packages/image_picker/image_picker_android/android/build.gradle @@ -35,15 +35,15 @@ android { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } dependencies { - implementation 'androidx.core:core:1.13.1' - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'androidx.exifinterface:exifinterface:1.4.1' - implementation 'androidx.activity:activity:1.10.1' + implementation("androidx.core:core:1.13.1") + implementation("androidx.annotation:annotation:1.9.1") + implementation("androidx.exifinterface:exifinterface:1.4.1") + implementation("androidx.activity:activity:1.10.1") - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation "org.robolectric:robolectric:4.15.1" + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } compileOptions { diff --git a/packages/image_picker/image_picker_android/example/android/app/build.gradle b/packages/image_picker/image_picker_android/example/android/app/build.gradle index 831c2eccd7c..b2e3e6c0dae 100755 --- a/packages/image_picker/image_picker_android/example/android/app/build.gradle +++ b/packages/image_picker/image_picker_android/example/android/app/build.gradle @@ -58,10 +58,10 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation project(':image_picker_android') - implementation project(':espresso') - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + implementation(project(':image_picker_android')) + implementation(project(':espresso')) + api("androidx.test:core:1.4.0") } diff --git a/packages/in_app_purchase/in_app_purchase/example/android/app/build.gradle b/packages/in_app_purchase/in_app_purchase/example/android/app/build.gradle index 607d8fca39f..a51fcaa1e3e 100644 --- a/packages/in_app_purchase/in_app_purchase/example/android/app/build.gradle +++ b/packages/in_app_purchase/in_app_purchase/example/android/app/build.gradle @@ -105,10 +105,10 @@ flutter { } dependencies { - implementation 'com.android.billingclient:billing:3.0.2' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.0.0' - testImplementation 'org.json:json:20250517' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + implementation("com.android.billingclient:billing:3.0.2") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.0.0") + testImplementation("org.json:json:20250517") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle index 987eec09b9b..2dcaf29925d 100644 --- a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle @@ -59,13 +59,13 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'com.android.billingclient:billing:7.1.1' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.json:json:20250517' - testImplementation 'org.mockito:mockito-core:5.19.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation 'org.robolectric:robolectric:4.15.1' - androidTestImplementation 'androidx.test:runner:1.7.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' + implementation("androidx.annotation:annotation:1.9.1") + implementation("com.android.billingclient:billing:7.1.1") + testImplementation("junit:junit:4.13.2") + testImplementation("org.json:json:20250517") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") + androidTestImplementation("androidx.test:runner:1.7.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") } diff --git a/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle b/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle index 4fce09dc41f..14e9209d199 100644 --- a/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/example/android/app/build.gradle @@ -105,10 +105,10 @@ flutter { } dependencies { - implementation 'com.android.billingclient:billing:6.1.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.1.1' - testImplementation 'org.json:json:20250517' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + implementation("com.android.billingclient:billing:6.1.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.1.1") + testImplementation("org.json:json:20250517") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/interactive_media_ads/android/build.gradle b/packages/interactive_media_ads/android/build.gradle index 17b3aefecbe..b695658229d 100644 --- a/packages/interactive_media_ads/android/build.gradle +++ b/packages/interactive_media_ads/android/build.gradle @@ -48,14 +48,14 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'androidx.core:core-ktx:1.13.0' - implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.36.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.jetbrains.kotlin:kotlin-test' - testImplementation "org.mockito.kotlin:mockito-kotlin:6.0.0" - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'androidx.test:core:1.7.0' + implementation("androidx.annotation:annotation:1.9.1") + implementation("androidx.core:core-ktx:1.13.0") + implementation("com.google.ads.interactivemedia.v3:interactivemedia:3.36.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.jetbrains.kotlin:kotlin-test") + testImplementation("org.mockito.kotlin:mockito-kotlin:6.0.0") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("androidx.test:core:1.7.0") } lintOptions { diff --git a/packages/interactive_media_ads/example/android/app/build.gradle b/packages/interactive_media_ads/example/android/app/build.gradle index 1ea76f564af..7083f5b4234 100644 --- a/packages/interactive_media_ads/example/android/app/build.gradle +++ b/packages/interactive_media_ads/example/android/app/build.gradle @@ -71,10 +71,10 @@ flutter { dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' // #enddocregion android_desugaring - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") // #docregion android_desugaring } // #enddocregion android_desugaring diff --git a/packages/local_auth/local_auth/example/android/app/build.gradle b/packages/local_auth/local_auth/example/android/app/build.gradle index 6f07e909021..c1619d0e908 100644 --- a/packages/local_auth/local_auth/example/android/app/build.gradle +++ b/packages/local_auth/local_auth/example/android/app/build.gradle @@ -51,7 +51,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/local_auth/local_auth_android/android/build.gradle b/packages/local_auth/local_auth_android/android/build.gradle index b6fe5d8d0cc..dbd28ccb95d 100644 --- a/packages/local_auth/local_auth_android/android/build.gradle +++ b/packages/local_auth/local_auth_android/android/build.gradle @@ -56,13 +56,13 @@ android { } dependencies { - api "androidx.core:core:1.13.1" - api "androidx.biometric:biometric:1.1.0" - api "androidx.fragment:fragment:1.8.8" - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'org.robolectric:robolectric:4.15.1' - androidTestImplementation 'androidx.test:runner:1.7.0' - androidTestImplementation 'androidx.test:rules:1.7.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' + api("androidx.core:core:1.13.1") + api("androidx.biometric:biometric:1.1.0") + api("androidx.fragment:fragment:1.8.8") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("org.robolectric:robolectric:4.15.1") + androidTestImplementation("androidx.test:runner:1.7.0") + androidTestImplementation("androidx.test:rules:1.7.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0") } diff --git a/packages/local_auth/local_auth_android/example/android/app/build.gradle b/packages/local_auth/local_auth_android/example/android/app/build.gradle index 6f07e909021..c1619d0e908 100644 --- a/packages/local_auth/local_auth_android/example/android/app/build.gradle +++ b/packages/local_auth/local_auth_android/example/android/app/build.gradle @@ -51,7 +51,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/path_provider/path_provider/example/android/app/build.gradle b/packages/path_provider/path_provider/example/android/app/build.gradle index 21a8a014717..c988324be3e 100644 --- a/packages/path_provider/path_provider/example/android/app/build.gradle +++ b/packages/path_provider/path_provider/example/android/app/build.gradle @@ -53,11 +53,11 @@ flutter { } dependencies { - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test:rules:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/path_provider/path_provider_android/android/build.gradle b/packages/path_provider/path_provider_android/android/build.gradle index f4ff96ad130..bbd2c1bf82e 100644 --- a/packages/path_provider/path_provider_android/android/build.gradle +++ b/packages/path_provider/path_provider_android/android/build.gradle @@ -54,6 +54,6 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - testImplementation 'junit:junit:4.13.2' + implementation("androidx.annotation:annotation:1.9.1") + testImplementation("junit:junit:4.13.2") } diff --git a/packages/path_provider/path_provider_android/example/android/app/build.gradle b/packages/path_provider/path_provider_android/example/android/app/build.gradle index 21a8a014717..c988324be3e 100644 --- a/packages/path_provider/path_provider_android/example/android/app/build.gradle +++ b/packages/path_provider/path_provider_android/example/android/app/build.gradle @@ -53,11 +53,11 @@ flutter { } dependencies { - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test:rules:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle index 7880a638794..aa3ed9be33d 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle @@ -53,7 +53,7 @@ android { } dependencies { - testImplementation 'junit:junit:4.13.2' - testImplementation "org.mockito:mockito-core:5.19.0" + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") } } diff --git a/packages/pigeon/platform_tests/test_plugin/android/build.gradle b/packages/pigeon/platform_tests/test_plugin/android/build.gradle index 4232abb657e..0a1ddf92a66 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/build.gradle +++ b/packages/pigeon/platform_tests/test_plugin/android/build.gradle @@ -65,8 +65,8 @@ android { } dependencies { - testImplementation 'junit:junit:4.13.2' - testImplementation "io.mockk:mockk:1.14.5" + testImplementation("junit:junit:4.13.2") + testImplementation("io.mockk:mockk:1.14.5") // org.jetbrains.kotlin:kotlin-bom artifact purpose is to align kotlin stdlib and related code versions. // See: https://youtrack.jetbrains.com/issue/KT-55297/kotlin-stdlib-should-declare-constraints-on-kotlin-stdlib-jdk8-and-kotlin-stdlib-jdk7 implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.0.21")) diff --git a/packages/quick_actions/quick_actions/example/android/app/build.gradle b/packages/quick_actions/quick_actions/example/android/app/build.gradle index 43e1634a35d..333e459a31f 100644 --- a/packages/quick_actions/quick_actions/example/android/app/build.gradle +++ b/packages/quick_actions/quick_actions/example/android/app/build.gradle @@ -51,8 +51,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/quick_actions/quick_actions_android/android/build.gradle b/packages/quick_actions/quick_actions_android/android/build.gradle index ee409d9e3a4..e54aed6574a 100644 --- a/packages/quick_actions/quick_actions_android/android/build.gradle +++ b/packages/quick_actions/quick_actions_android/android/build.gradle @@ -36,9 +36,9 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' + implementation("androidx.annotation:annotation:1.9.1") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") } compileOptions { diff --git a/packages/quick_actions/quick_actions_android/example/android/app/build.gradle b/packages/quick_actions/quick_actions_android/example/android/app/build.gradle index 59127027fe1..506037798ac 100644 --- a/packages/quick_actions/quick_actions_android/example/android/app/build.gradle +++ b/packages/quick_actions/quick_actions_android/example/android/app/build.gradle @@ -53,13 +53,13 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api "androidx.test:core:$androidXTestVersion" + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:$androidXTestVersion") - androidTestImplementation "androidx.test:runner:$androidXTestVersion" - androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' - androidTestImplementation 'androidx.test.ext:junit:1.0.0' - androidTestImplementation 'org.mockito:mockito-core:5.0.0' - androidTestImplementation 'org.mockito:mockito-android:5.0.0' + androidTestImplementation("androidx.test:runner:$androidXTestVersion") + androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") + androidTestImplementation("androidx.test.ext:junit:1.0.0") + androidTestImplementation("org.mockito:mockito-core:5.0.0") + androidTestImplementation("org.mockito:mockito-android:5.0.0") } diff --git a/packages/shared_preferences/shared_preferences_android/android/build.gradle b/packages/shared_preferences/shared_preferences_android/android/build.gradle index c2a15cf27ec..bee51e0d250 100644 --- a/packages/shared_preferences/shared_preferences_android/android/build.gradle +++ b/packages/shared_preferences/shared_preferences_android/android/build.gradle @@ -59,15 +59,15 @@ android { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } dependencies { - implementation 'androidx.datastore:datastore:1.1.7' - implementation 'androidx.datastore:datastore-preferences:1.1.7' - implementation 'androidx.preference:preference:1.2.1' - testImplementation 'junit:junit:4.13.2' - testImplementation 'androidx.test:core-ktx:1.7.0' - testImplementation 'androidx.test.ext:junit-ktx:1.2.1' - testImplementation 'org.robolectric:robolectric:4.15.1' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'io.mockk:mockk:1.14.5' + implementation("androidx.datastore:datastore:1.1.7") + implementation("androidx.datastore:datastore-preferences:1.1.7") + implementation("androidx.preference:preference:1.2.1") + testImplementation("junit:junit:4.13.2") + testImplementation("androidx.test:core-ktx:1.7.0") + testImplementation("androidx.test.ext:junit-ktx:1.2.1") + testImplementation("org.robolectric:robolectric:4.15.1") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("io.mockk:mockk:1.14.5") } diff --git a/packages/shared_preferences/shared_preferences_android/example/android/app/build.gradle b/packages/shared_preferences/shared_preferences_android/example/android/app/build.gradle index 882dcce14a6..34c23960e93 100644 --- a/packages/shared_preferences/shared_preferences_android/example/android/app/build.gradle +++ b/packages/shared_preferences/shared_preferences_android/example/android/app/build.gradle @@ -76,12 +76,12 @@ flutter { } dependencies { - implementation "androidx.datastore:datastore-preferences:1.0.0" - implementation 'androidx.preference:preference:1.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + implementation("androidx.datastore:datastore-preferences:1.0.0") + implementation("androidx.preference:preference:1.2.1") + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.espresso:espresso-intents:3.2.0") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test:rules:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/url_launcher/url_launcher/example/android/app/build.gradle b/packages/url_launcher/url_launcher/example/android/app/build.gradle index 5425ebdfc7e..9198eba6536 100644 --- a/packages/url_launcher/url_launcher/example/android/app/build.gradle +++ b/packages/url_launcher/url_launcher/example/android/app/build.gradle @@ -53,7 +53,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") } diff --git a/packages/url_launcher/url_launcher_android/android/build.gradle b/packages/url_launcher/url_launcher_android/android/build.gradle index 825ddeabad5..0ef2379c36c 100644 --- a/packages/url_launcher/url_launcher_android/android/build.gradle +++ b/packages/url_launcher/url_launcher_android/android/build.gradle @@ -61,11 +61,11 @@ android { dependencies { // Java language implementation - implementation "androidx.core:core:1.13.1" - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'androidx.browser:browser:1.8.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' - testImplementation 'androidx.test:core:1.7.0' - testImplementation 'org.robolectric:robolectric:4.15.1' + implementation("androidx.core:core:1.13.1") + implementation("androidx.annotation:annotation:1.9.1") + implementation("androidx.browser:browser:1.8.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.robolectric:robolectric:4.15.1") } diff --git a/packages/url_launcher/url_launcher_android/example/android/app/build.gradle b/packages/url_launcher/url_launcher_android/example/android/app/build.gradle index 5425ebdfc7e..9198eba6536 100644 --- a/packages/url_launcher/url_launcher_android/example/android/app/build.gradle +++ b/packages/url_launcher/url_launcher_android/example/android/app/build.gradle @@ -53,7 +53,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") } diff --git a/packages/video_player/video_player/example/android/app/build.gradle b/packages/video_player/video_player/example/android/app/build.gradle index d543c76cf6c..1895ab44dda 100644 --- a/packages/video_player/video_player/example/android/app/build.gradle +++ b/packages/video_player/video_player/example/android/app/build.gradle @@ -57,9 +57,9 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.robolectric:robolectric:4.10.3' - testImplementation 'org.mockito:mockito-core:5.0.0' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation("junit:junit:4.13.2") + testImplementation("org.robolectric:robolectric:4.10.3") + testImplementation("org.mockito:mockito-core:5.0.0") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") } diff --git a/packages/video_player/video_player_android/android/build.gradle b/packages/video_player/video_player_android/android/build.gradle index 899ad562a8b..7723774ae03 100644 --- a/packages/video_player/video_player_android/android/build.gradle +++ b/packages/video_player/video_player_android/android/build.gradle @@ -41,16 +41,16 @@ android { dependencies { def exoplayer_version = "1.5.1" - implementation "androidx.media3:media3-exoplayer:${exoplayer_version}" - implementation "androidx.media3:media3-exoplayer-hls:${exoplayer_version}" - implementation "androidx.media3:media3-exoplayer-dash:${exoplayer_version}" - implementation "androidx.media3:media3-exoplayer-rtsp:${exoplayer_version}" - implementation "androidx.media3:media3-exoplayer-smoothstreaming:${exoplayer_version}" - testImplementation 'junit:junit:4.13.2' - testImplementation 'androidx.test:core:1.7.0' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'org.robolectric:robolectric:4.15.1' - testImplementation "androidx.media3:media3-test-utils:${exoplayer_version}" + implementation("androidx.media3:media3-exoplayer:${exoplayer_version}") + implementation("androidx.media3:media3-exoplayer-hls:${exoplayer_version}") + implementation("androidx.media3:media3-exoplayer-dash:${exoplayer_version}") + implementation("androidx.media3:media3-exoplayer-rtsp:${exoplayer_version}") + implementation("androidx.media3:media3-exoplayer-smoothstreaming:${exoplayer_version}") + testImplementation("junit:junit:4.13.2") + testImplementation("androidx.test:core:1.7.0") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("org.robolectric:robolectric:4.15.1") + testImplementation("androidx.media3:media3-test-utils:${exoplayer_version}") } testOptions { diff --git a/packages/video_player/video_player_android/example/android/app/build.gradle b/packages/video_player/video_player_android/example/android/app/build.gradle index a004af0c2e3..b514ca03124 100644 --- a/packages/video_player/video_player_android/example/android/app/build.gradle +++ b/packages/video_player/video_player_android/example/android/app/build.gradle @@ -57,13 +57,13 @@ flutter { } dependencies { - testImplementation 'androidx.test.ext:junit:1.2.1' - testImplementation "com.google.truth:truth:1.1.3" - testImplementation 'junit:junit:4.13' - testImplementation 'org.robolectric:robolectric:4.10.3' - testImplementation 'org.mockito:mockito-core:5.0.0' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' - implementation project(':espresso') - api 'androidx.test:core:1.2.0' + testImplementation("androidx.test.ext:junit:1.2.1") + testImplementation("com.google.truth:truth:1.1.3") + testImplementation("junit:junit:4.13") + testImplementation("org.robolectric:robolectric:4.10.3") + testImplementation("org.mockito:mockito-core:5.0.0") + androidTestImplementation("androidx.test:runner:1.1.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") + implementation(project(':espresso')) + api("androidx.test:core:1.2.0") } diff --git a/packages/video_player/video_player_android/example/android/build.gradle b/packages/video_player/video_player_android/example/android/build.gradle index 3e4f781f6dc..f380df723f2 100644 --- a/packages/video_player/video_player_android/example/android/build.gradle +++ b/packages/video_player/video_player_android/example/android/build.gradle @@ -51,8 +51,8 @@ gradle.projectsEvaluated { // For future reference the dependencies are excluded here: // https://github.com/google/ExoPlayer/blob/r2.18.1/library/common/build.gradle#L33-L34 dependencies { - implementation "org.checkerframework:checker-qual:3.13.0" - implementation "com.google.errorprone:error_prone_annotations:2.10.0" + implementation("org.checkerframework:checker-qual:3.13.0") + implementation("com.google.errorprone:error_prone_annotations:2.10.0") } } } diff --git a/packages/webview_flutter/webview_flutter/example/android/app/build.gradle b/packages/webview_flutter/webview_flutter/example/android/app/build.gradle index 8099827df01..055f4dc43a9 100644 --- a/packages/webview_flutter/webview_flutter/example/android/app/build.gradle +++ b/packages/webview_flutter/webview_flutter/example/android/app/build.gradle @@ -55,8 +55,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/packages/webview_flutter/webview_flutter_android/android/build.gradle b/packages/webview_flutter/webview_flutter_android/android/build.gradle index ee074731600..988cddafb0a 100644 --- a/packages/webview_flutter/webview_flutter_android/android/build.gradle +++ b/packages/webview_flutter/webview_flutter_android/android/build.gradle @@ -49,12 +49,12 @@ android { } dependencies { - implementation 'androidx.annotation:annotation:1.9.1' - implementation 'androidx.webkit:webkit:1.14.0' - testImplementation 'junit:junit:4.13.2' - testImplementation 'org.mockito:mockito-core:5.19.0' - testImplementation 'org.mockito:mockito-inline:5.2.0' - testImplementation 'androidx.test:core:1.7.0' + implementation("androidx.annotation:annotation:1.9.1") + implementation("androidx.webkit:webkit:1.14.0") + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.19.0") + testImplementation("org.mockito:mockito-inline:5.2.0") + testImplementation("androidx.test:core:1.7.0") } testOptions { diff --git a/packages/webview_flutter/webview_flutter_android/example/android/app/build.gradle b/packages/webview_flutter/webview_flutter_android/example/android/app/build.gradle index c8bf2055a3d..eca2fb1fcdb 100644 --- a/packages/webview_flutter/webview_flutter_android/example/android/app/build.gradle +++ b/packages/webview_flutter/webview_flutter_android/example/android/app/build.gradle @@ -63,8 +63,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - api 'androidx.test:core:1.4.0' + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") + api("androidx.test:core:1.4.0") } diff --git a/script/tool/lib/src/common/package_state_utils.dart b/script/tool/lib/src/common/package_state_utils.dart index 523849cc9ec..a5ac2daeb8a 100644 --- a/script/tool/lib/src/common/package_state_utils.dart +++ b/script/tool/lib/src/common/package_state_utils.dart @@ -241,7 +241,7 @@ Future _isGradleTestDependencyChange(List pathComponents, final List diff = await git.getDiffContents(targetPath: repoPath); final RegExp changeLine = RegExp(r'^[+-] '); final RegExp testDependencyLine = - RegExp(r'^[+-]\s*(?:androidT|t)estImplementation\s'); + RegExp(r'^[+-]\s*(?:androidT|t)estImplementation(?:\s|\()'); bool foundTestDependencyChange = false; for (final String line in diff) { if (!changeLine.hasMatch(line) || diff --git a/script/tool/test/common/package_state_utils_test.dart b/script/tool/test/common/package_state_utils_test.dart index 683f272736e..7ebb7488914 100644 --- a/script/tool/test/common/package_state_utils_test.dart +++ b/script/tool/test/common/package_state_utils_test.dart @@ -254,7 +254,7 @@ void main() { test( 'does not requires changelog or version change for build.gradle ' - 'test-dependency-only changes', () async { + 'test-dependency-only changes with space style', () async { final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir); @@ -281,7 +281,37 @@ void main() { expect(state.needsChangelogChange, false); }); - test('requires changelog or version change for other build.gradle changes', + test( + 'does not requires changelog or version change for build.gradle ' + 'test-dependency-only changes with paren style', () async { + final RepositoryPackage package = + createFakePlugin('a_plugin', packagesDir); + + const List changedFiles = [ + 'packages/a_plugin/android/build.gradle', + ]; + + final GitVersionFinder git = FakeGitVersionFinder(>{ + 'packages/a_plugin/android/build.gradle': [ + '- androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")', + '- testImplementation("junit:junit:4.10.0")', + '+ androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0"', + '+ testImplementation("junit:junit:4.13.2")', + ] + }); + + final PackageChangeState state = await checkPackageChangeState(package, + changedPaths: changedFiles, + relativePackagePath: 'packages/a_plugin/', + git: git); + + expect(state.hasChanges, true); + expect(state.needsVersionChange, false); + expect(state.needsChangelogChange, false); + }); + + test( + 'requires changelog or version change for other build.gradle changes with space style', () async { final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir); @@ -311,6 +341,37 @@ void main() { expect(state.needsChangelogChange, true); }); + test( + 'requires changelog or version change for other build.gradle changes with paren style', + () async { + final RepositoryPackage package = + createFakePlugin('a_plugin', packagesDir); + + const List changedFiles = [ + 'packages/a_plugin/android/build.gradle', + ]; + + final GitVersionFinder git = FakeGitVersionFinder(>{ + 'packages/a_plugin/android/build.gradle': [ + '- androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")', + '- testImplementation("junit:junit:4.10.0")', + '+ androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")', + '+ testImplementation("junit:junit:4.13.2")', + '- implementation("com.google.android.gms:play-services-maps:18.0.0")', + '+ implementation("com.google.android.gms:play-services-maps:18.0.2")', + ] + }); + + final PackageChangeState state = await checkPackageChangeState(package, + changedPaths: changedFiles, + relativePackagePath: 'packages/a_plugin/', + git: git); + + expect(state.hasChanges, true); + expect(state.needsVersionChange, true); + expect(state.needsChangelogChange, true); + }); + test( 'does not requires changelog or version change for ' 'non-doc-comment-only changes', () async { diff --git a/script/tool/test/gradle_check_command_test.dart b/script/tool/test/gradle_check_command_test.dart index 1b93d69fff0..f3fd8b0eeab 100644 --- a/script/tool/test/gradle_check_command_test.dart +++ b/script/tool/test/gradle_check_command_test.dart @@ -264,7 +264,7 @@ flutter { } dependencies { - testImplementation 'fake.package:fake:1.0.0' + testImplementation("fake.package:fake:1.0.0") } '''); } From 36c266de10133359c0f0d444a960568d07cae260 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 25 Sep 2025 20:25:28 -0400 Subject: [PATCH 2/3] Fix test typo --- script/tool/test/common/package_state_utils_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/tool/test/common/package_state_utils_test.dart b/script/tool/test/common/package_state_utils_test.dart index 7ebb7488914..71d7e6a679b 100644 --- a/script/tool/test/common/package_state_utils_test.dart +++ b/script/tool/test/common/package_state_utils_test.dart @@ -295,7 +295,7 @@ void main() { 'packages/a_plugin/android/build.gradle': [ '- androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")', '- testImplementation("junit:junit:4.10.0")', - '+ androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0"', + '+ androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")', '+ testImplementation("junit:junit:4.13.2")', ] }); From 911d042df8fda2a45ec75c2d567c1523f6385219 Mon Sep 17 00:00:00 2001 From: stuartmorgan-g Date: Fri, 26 Sep 2025 13:13:11 -0400 Subject: [PATCH 3/3] Fix typo Co-authored-by: Reid Baker <1063596+reidbaker@users.noreply.github.com> --- script/tool/test/common/package_state_utils_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/tool/test/common/package_state_utils_test.dart b/script/tool/test/common/package_state_utils_test.dart index 71d7e6a679b..7ec4089dbe0 100644 --- a/script/tool/test/common/package_state_utils_test.dart +++ b/script/tool/test/common/package_state_utils_test.dart @@ -282,7 +282,7 @@ void main() { }); test( - 'does not requires changelog or version change for build.gradle ' + 'does not require changelog or version change for build.gradle ' 'test-dependency-only changes with paren style', () async { final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir);