Skip to content

Commit b4cd85f

Browse files
[various] Standardize gradle dependencies (#10083)
Standardizes dependencies in build.gradle files on using parentheses rather than space. Also standardizes these lines on `"` rather than `'` while touching them, since that also moves closer to Kotlin syntax. 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 flutter/flutter#176065 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 61c98f1 commit b4cd85f

File tree

53 files changed

+358
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+358
-297
lines changed

packages/camera/camera/example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ flutter {
5656
}
5757

5858
dependencies {
59-
testImplementation 'junit:junit:4.13.2'
60-
androidTestImplementation 'androidx.test:runner:1.2.0'
61-
androidTestImplementation 'androidx.test:rules:1.2.0'
62-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
59+
testImplementation("junit:junit:4.13.2")
60+
androidTestImplementation("androidx.test:runner:1.2.0")
61+
androidTestImplementation("androidx.test:rules:1.2.0")
62+
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
6363
}

packages/camera/camera_android/android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ buildFeatures {
6666
}
6767

6868
dependencies {
69-
implementation 'androidx.annotation:annotation:1.9.1'
70-
testImplementation 'junit:junit:4.13.2'
71-
testImplementation 'org.mockito:mockito-inline:5.2.0'
72-
testImplementation 'androidx.test:core:1.7.0'
73-
testImplementation 'org.robolectric:robolectric:4.15.1'
69+
implementation("androidx.annotation:annotation:1.9.1")
70+
testImplementation("junit:junit:4.13.2")
71+
testImplementation("org.mockito:mockito-inline:5.2.0")
72+
testImplementation("androidx.test:core:1.7.0")
73+
testImplementation("org.robolectric:robolectric:4.15.1")
7474
}

packages/camera/camera_android/example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ flutter {
5656
}
5757

5858
dependencies {
59-
testImplementation 'junit:junit:4.13.2'
60-
androidTestImplementation 'androidx.test:runner:1.2.0'
61-
androidTestImplementation 'androidx.test:rules:1.2.0'
62-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
59+
testImplementation("junit:junit:4.13.2")
60+
androidTestImplementation("androidx.test:runner:1.2.0")
61+
androidTestImplementation("androidx.test:rules:1.2.0")
62+
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
6363
}

packages/camera/camera_android_camerax/android/build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ android {
7373
dependencies {
7474
// CameraX core library using the camera2 implementation must use same version number.
7575
def camerax_version = "1.5.0"
76-
implementation "androidx.camera:camera-core:${camerax_version}"
77-
implementation "androidx.camera:camera-camera2:${camerax_version}"
78-
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
79-
implementation "androidx.camera:camera-video:${camerax_version}"
80-
implementation 'com.google.guava:guava:33.5.0-android'
81-
testImplementation 'junit:junit:4.13.2'
82-
testImplementation "org.mockito:mockito-core:5.19.0"
83-
testImplementation 'org.mockito:mockito-inline:5.2.0'
84-
testImplementation 'androidx.test:core:1.7.0'
85-
testImplementation 'org.robolectric:robolectric:4.15.1'
76+
implementation("androidx.camera:camera-core:${camerax_version}")
77+
implementation("androidx.camera:camera-camera2:${camerax_version}")
78+
implementation("androidx.camera:camera-lifecycle:${camerax_version}")
79+
implementation("androidx.camera:camera-video:${camerax_version}")
80+
implementation("com.google.guava:guava:33.5.0-android")
81+
testImplementation("junit:junit:4.13.2")
82+
testImplementation("org.mockito:mockito-core:5.19.0")
83+
testImplementation("org.mockito:mockito-inline:5.2.0")
84+
testImplementation("androidx.test:core:1.7.0")
85+
testImplementation("org.robolectric:robolectric:4.15.1")
8686
}

packages/camera/camera_android_camerax/example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ flutter {
6060
}
6161

6262
dependencies {
63-
testImplementation 'junit:junit:4.13.2'
64-
androidTestImplementation 'androidx.test:runner:1.2.0'
65-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
66-
api 'androidx.test:core:1.4.0'
63+
testImplementation("junit:junit:4.13.2")
64+
androidTestImplementation("androidx.test:runner:1.2.0")
65+
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
66+
api("androidx.test:core:1.4.0")
6767
}

packages/espresso/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Add the following dependencies in android/app/build.gradle:
1818

1919
```groovy
2020
dependencies {
21-
testImplementation 'junit:junit:4.13.2'
22-
testImplementation "com.google.truth:truth:1.1.3"
23-
androidTestImplementation 'androidx.test:runner:1.6.1'
24-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
25-
api 'androidx.test:core:1.2.0'
21+
testImplementation("junit:junit:4.13.2")
22+
testImplementation("com.google.truth:truth:1.1.3")
23+
androidTestImplementation("androidx.test:runner:1.6.1")
24+
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
25+
api("androidx.test:core:1.2.0")
2626
}
2727
```
2828

packages/espresso/android/build.gradle

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,40 +57,40 @@ android {
5757
}
5858

5959
dependencies {
60-
implementation 'com.google.guava:guava:33.4.8-android'
61-
implementation 'com.squareup.okhttp3:okhttp:5.1.0'
62-
implementation 'com.google.code.gson:gson:2.13.2'
63-
androidTestImplementation 'org.hamcrest:hamcrest:3.0'
60+
implementation("com.google.guava:guava:33.4.8-android")
61+
implementation("com.squareup.okhttp3:okhttp:5.1.0")
62+
implementation("com.google.code.gson:gson:2.13.2")
63+
androidTestImplementation("org.hamcrest:hamcrest:3.0")
6464

65-
testImplementation 'junit:junit:4.13.2'
66-
testImplementation "com.google.truth:truth:1.4.5"
67-
api 'androidx.test.espresso:espresso-core:3.7.0'
65+
testImplementation("junit:junit:4.13.2")
66+
testImplementation("com.google.truth:truth:1.4.5")
67+
api("androidx.test.espresso:espresso-core:3.7.0")
6868

6969
// Core library
70-
api 'androidx.test:core:1.7.0'
70+
api("androidx.test:core:1.7.0")
7171

7272
// AndroidJUnitRunner and JUnit Rules
73-
api 'androidx.test:runner:1.7.0'
74-
api 'androidx.test:rules:1.7.0'
73+
api("androidx.test:runner:1.7.0")
74+
api("androidx.test:rules:1.7.0")
7575

7676
// Assertions
77-
api 'androidx.test.ext:junit:1.3.0'
78-
api 'androidx.test.ext:truth:1.7.0'
79-
api 'com.google.truth:truth:1.4.5'
77+
api("androidx.test.ext:junit:1.3.0")
78+
api("androidx.test.ext:truth:1.7.0")
79+
api("com.google.truth:truth:1.4.5")
8080

8181
// Espresso dependencies
82-
api 'androidx.test.espresso:espresso-core:3.7.0'
83-
api 'androidx.test.espresso:espresso-contrib:3.7.0'
84-
api 'androidx.test.espresso:espresso-intents:3.7.0'
85-
api 'androidx.test.espresso:espresso-accessibility:3.7.0'
86-
api 'androidx.test.espresso:espresso-web:3.7.0'
87-
api 'androidx.test.espresso.idling:idling-concurrent:3.7.0'
82+
api("androidx.test.espresso:espresso-core:3.7.0")
83+
api("androidx.test.espresso:espresso-contrib:3.7.0")
84+
api("androidx.test.espresso:espresso-intents:3.7.0")
85+
api("androidx.test.espresso:espresso-accessibility:3.7.0")
86+
api("androidx.test.espresso:espresso-web:3.7.0")
87+
api("androidx.test.espresso.idling:idling-concurrent:3.7.0")
8888

8989
// The following Espresso dependency can be either "implementation"
9090
// or "androidTestImplementation", depending on whether you want the
9191
// dependency to appear on your APK's compile classpath or the test APK
9292
// classpath.
93-
api 'androidx.test.espresso:espresso-idling-resource:3.7.0'
93+
api("androidx.test.espresso:espresso-idling-resource:3.7.0")
9494
}
9595

9696

packages/espresso/example/android/app/build.gradle

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,34 +53,34 @@ flutter {
5353
}
5454

5555
dependencies {
56-
testImplementation 'junit:junit:4.13.2'
56+
testImplementation("junit:junit:4.13.2")
5757

5858
// Multidex
59-
implementation "androidx.multidex:multidex:2.0.1"
59+
implementation("androidx.multidex:multidex:2.0.1")
6060

6161
// Core library
62-
api 'androidx.test:core:1.6.1'
62+
api("androidx.test:core:1.6.1")
6363

6464
// AndroidJUnitRunner and JUnit Rules
65-
androidTestImplementation 'androidx.test:runner:1.6.1'
66-
androidTestImplementation 'androidx.test:rules:1.6.1'
65+
androidTestImplementation("androidx.test:runner:1.6.1")
66+
androidTestImplementation("androidx.test:rules:1.6.1")
6767

6868
// Assertions
69-
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
70-
androidTestImplementation 'androidx.test.ext:truth:1.6.0'
71-
androidTestImplementation 'com.google.truth:truth:1.1.3'
69+
androidTestImplementation("androidx.test.ext:junit:1.2.1")
70+
androidTestImplementation("androidx.test.ext:truth:1.6.0")
71+
androidTestImplementation("com.google.truth:truth:1.1.3")
7272

7373
// Espresso dependencies
74-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
75-
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1'
76-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1'
77-
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.6.1'
78-
androidTestImplementation 'androidx.test.espresso:espresso-web:3.6.1'
79-
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.6.1'
74+
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
75+
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.6.1")
76+
androidTestImplementation("androidx.test.espresso:espresso-intents:3.6.1")
77+
androidTestImplementation("androidx.test.espresso:espresso-accessibility:3.6.1")
78+
androidTestImplementation("androidx.test.espresso:espresso-web:3.6.1")
79+
androidTestImplementation("androidx.test.espresso.idling:idling-concurrent:3.6.1")
8080

8181
// The following Espresso dependency can be either "implementation"
8282
// or "androidTestImplementation", depending on whether you want the
8383
// dependency to appear on your APK's compile classpath or the test APK
8484
// classpath.
85-
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.6.1'
85+
androidTestImplementation("androidx.test.espresso:espresso-idling-resource:3.6.1")
8686
}

packages/file_selector/file_selector_android/android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ android {
3535
}
3636

3737
dependencies {
38-
implementation 'androidx.annotation:annotation:1.9.1'
39-
testImplementation 'junit:junit:4.13.2'
40-
testImplementation 'org.mockito:mockito-inline:5.2.0'
41-
testImplementation 'androidx.test:core:1.7.0'
42-
testImplementation "org.robolectric:robolectric:4.15.1"
38+
implementation("androidx.annotation:annotation:1.9.1")
39+
testImplementation("junit:junit:4.13.2")
40+
testImplementation("org.mockito:mockito-inline:5.2.0")
41+
testImplementation("androidx.test:core:1.7.0")
42+
testImplementation("org.robolectric:robolectric:4.15.1")
4343
}
4444

4545
lintOptions {

packages/file_selector/file_selector_android/example/android/app/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ flutter {
5555
}
5656

5757
dependencies {
58-
testImplementation 'junit:junit:4.13.2'
59-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
60-
androidTestImplementation 'androidx.test:runner:1.4.0'
61-
androidTestImplementation 'androidx.test:rules:1.4.0'
62-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
63-
implementation project(':file_selector_android')
64-
implementation project(':espresso')
65-
api 'androidx.test:core:1.4.0'
58+
testImplementation("junit:junit:4.13.2")
59+
androidTestImplementation("androidx.test.espresso:espresso-intents:3.4.0")
60+
androidTestImplementation("androidx.test:runner:1.4.0")
61+
androidTestImplementation("androidx.test:rules:1.4.0")
62+
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
63+
implementation(project(':file_selector_android'))
64+
implementation(project(':espresso'))
65+
api("androidx.test:core:1.4.0")
6666
}

0 commit comments

Comments
 (0)