Skip to content

Commit 5d51217

Browse files
committed
apply dependency-analysis-android-gradle-plugin recommendations
- ignored recommentations to make things `implementation` where there's a comment specifically saying to leave it as `api` - ignored false positives saying to remove `:workflow-tracing` dependencies from sample projects
1 parent af41667 commit 5d51217

File tree

42 files changed

+169
-125
lines changed

Some content is hidden

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

42 files changed

+169
-125
lines changed

benchmarks/performance-poetry/complex-poetry/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,26 @@ dependencies {
5353

5454
// API on an app module so these are transitive dependencies for the benchmarks.
5555
api(project(":samples:containers:android"))
56+
api(project(":samples:containers:common"))
5657
api(project(":samples:containers:poetry"))
58+
api(project(":workflow-core"))
59+
api(project(":workflow-runtime"))
5760
api(project(":workflow-ui:core-android"))
61+
api(project(":workflow-ui:core-common"))
5862

5963
debugImplementation(libs.squareup.leakcanary.android)
6064

6165
implementation(libs.androidx.activity.ktx)
6266
implementation(libs.androidx.appcompat)
67+
implementation(libs.androidx.lifecycle.viewmodel.core)
68+
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
6369
// Used to side load Baseline Profile when Benchmarking and not installed by Play Store.
6470
implementation(libs.androidx.profileinstaller)
6571
implementation(libs.androidx.recyclerview)
72+
implementation(libs.androidx.savedstate)
6673
implementation(libs.androidx.test.uiautomator)
74+
implementation(libs.androidx.tracing.core)
6775
implementation(libs.androidx.tracing.ktx)
76+
implementation(libs.kotlinx.coroutines.core)
6877
implementation(libs.timber)
6978
}

gradle/libs.versions.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ targetSdk = "30"
99
androidx-activity = "1.3.0"
1010
androidx-appcompat = "1.3.1"
1111
androidx-benchmark = "1.1.0-rc03"
12+
androidx-cardview = "1.0.0"
1213
androidx-compose = "1.1.0-rc01"
1314
androidx-compose-compiler = "1.1.0-rc02"
1415
androidx-constraintlayout = "2.1.2"
@@ -108,15 +109,22 @@ androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref
108109

109110
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
110111

111-
androidx-macro-benchmark = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark" }
112+
androidx-cardview = { module = "androidx.cardview:cardview", version.ref = "androidx-cardview" }
112113

113114
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
115+
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "androidx-compose" }
114116

115117
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }
116118

119+
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose" }
120+
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable", version.ref = "androidx-compose" }
121+
117122
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" }
123+
androidx-compose-ui-geometry = { module = "androidx.compose.ui:ui-geometry", version.ref = "androidx-compose" }
124+
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "androidx-compose" }
118125
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
119126
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
127+
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }
120128

121129
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
122130

@@ -127,12 +135,16 @@ androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref
127135

128136
androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "androidx-gridlayout" }
129137

138+
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
139+
androidx-lifecycle-core = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "androidx-lifecycle" }
130140
androidx-lifecycle-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
131141
androidx-lifecycle-testing = { module = "androidx.lifecycle:lifecycle-runtime-testing", version.ref = "androidx-lifecycle" }
132142
androidx-lifecycle-viewmodel-core = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
133143
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
134144
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle" }
135145

146+
androidx-macro-benchmark = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark" }
147+
136148
androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version.ref = "androidx-profileinstaller" }
137149

138150
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidx-recyclerview" }
@@ -149,6 +161,7 @@ androidx-test-truth = { module = "androidx.test.ext:truth", version.ref = "andro
149161

150162
androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.2.0"
151163

164+
androidx-tracing-core = { module = "androidx.tracing:tracing", version.ref = "androidx-tracing" }
152165
androidx-tracing-ktx = { module = "androidx.tracing:tracing-ktx", version.ref = "androidx-tracing" }
153166

154167
androidx-transition = { module = "androidx.transition:transition", version.ref = "androidx-transition" }
@@ -178,6 +191,7 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
178191
kotlin-serialization-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
179192
kotlin-test-annotations = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" }
180193
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
194+
kotlin-test-core = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
181195
kotlin-test-jdk = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
182196

183197
kotlinx-binaryCompatibility-gradle-plugin = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "kotlinx-binary-compatibility" }
@@ -196,12 +210,14 @@ ktlint-gradle = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref =
196210
lanterna = "com.googlecode.lanterna:lanterna:3.1.1"
197211

198212
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito-core" }
199-
200213
mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockito-kotlin" }
201214

202215
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
203216

217+
reactivestreams = "org.reactivestreams:reactive-streams:1.0.3"
218+
204219
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
220+
robolectric-annotations = { module = "org.robolectric:annotations", version.ref = "robolectric" }
205221

206222
rxjava2-rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxjava2-android" }
207223
rxjava2-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "rxjava2-core" }
@@ -212,6 +228,7 @@ squareup-cycler = { module = "com.squareup.cycler:cycler", version.ref = "square
212228

213229
squareup-leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "squareup-leakcanary" }
214230
squareup-leakcanary-instrumentation = { module = "com.squareup.leakcanary:leakcanary-android-instrumentation", version.ref = "squareup-leakcanary" }
231+
squareup-leakcanary-objectwatcher-android = { module = "com.squareup.leakcanary:leakcanary-object-watcher-android-core", version.ref = "squareup-leakcanary" }
215232

216233
squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "squareup-moshi" }
217234
squareup-moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "squareup-moshi" }

internal-testing-utils/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies {
77
implementation(libs.kotlin.jdk8)
88

99
testImplementation(libs.junit)
10+
testImplementation(libs.kotlin.test.core)
1011
testImplementation(libs.kotlin.test.jdk)
1112
testImplementation(libs.truth)
1213
}

samples/compose-samples/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,25 @@ dependencies {
3131
debugImplementation(libs.squareup.leakcanary.android)
3232

3333
implementation(libs.androidx.activity.compose)
34+
implementation(libs.androidx.activity.core)
35+
implementation(libs.androidx.compose.foundation)
36+
implementation(libs.androidx.compose.foundation.layout)
3437
implementation(libs.androidx.compose.material)
38+
implementation(libs.androidx.compose.runtime)
3539
implementation(libs.androidx.compose.ui)
40+
implementation(libs.androidx.compose.ui.geometry)
41+
implementation(libs.androidx.compose.ui.graphics)
3642
implementation(libs.androidx.compose.ui.tooling)
43+
implementation(libs.androidx.compose.ui.tooling.preview)
3744
implementation(libs.androidx.lifecycle.viewmodel.ktx)
3845
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
3946
implementation(libs.androidx.viewbinding)
47+
implementation(libs.kotlin.common)
4048
// For the LayoutInspector.
4149
implementation(libs.kotlin.reflect)
4250

4351
implementation(project(":workflow-ui:compose"))
4452
implementation(project(":workflow-ui:compose-tooling"))
4553
implementation(project(":workflow-ui:core-android"))
54+
implementation(project(":workflow-ui:core-common"))
4655
}

samples/containers/android/build.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ dependencies {
2222
api(libs.kotlin.jdk6)
2323

2424
api(project(":samples:containers:common"))
25-
api(project(":workflow-core"))
26-
api(project(":workflow-ui:container-android"))
25+
api(project(":workflow-ui:core-android"))
26+
api(project(":workflow-ui:core-common"))
2727

2828
implementation(libs.androidx.appcompat)
29+
implementation(libs.androidx.core)
2930
implementation(libs.androidx.savedstate)
3031
implementation(libs.kotlinx.coroutines.android)
3132
implementation(libs.kotlinx.coroutines.core)
32-
33-
implementation(project(":workflow-runtime"))
3433
}

samples/containers/app-poetry/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ dependencies {
1919

2020
implementation(project(":samples:containers:android"))
2121
implementation(project(":samples:containers:poetry"))
22-
implementation(project(":workflow-ui:core-android"))
2322
}

samples/containers/app-raven/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ dependencies {
1818

1919
implementation(project(":samples:containers:android"))
2020
implementation(project(":samples:containers:poetry"))
21-
implementation(project(":workflow-ui:core-android"))
2221
}

samples/containers/common/build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ plugins {
33
}
44

55
dependencies {
6-
implementation(libs.kotlin.jdk6)
6+
api(project(":workflow-ui:core-common"))
77

8-
implementation(project(":workflow-core"))
9-
implementation(project(":workflow-ui:container-common"))
8+
implementation(libs.kotlin.jdk6)
109

1110
testImplementation(libs.hamcrest)
1211
testImplementation(libs.junit)
1312
testImplementation(libs.kotlin.test.jdk)
1413
testImplementation(libs.truth)
15-
16-
testImplementation(project(":workflow-testing"))
1714
}

samples/containers/hello-back-button/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ dependencies {
1818
implementation(libs.androidx.activity.ktx)
1919

2020
implementation(project(":samples:containers:android"))
21+
implementation(project(":workflow-ui:container-android"))
2122
implementation(project(":workflow-ui:core-android"))
23+
implementation(project(":workflow-ui:core-common"))
2224
}

samples/containers/poetry/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ dependencies {
1010

1111
api(project(":samples:containers:common"))
1212
api(project(":workflow-core"))
13-
api(project(":workflow-ui:container-android"))
13+
api(project(":workflow-ui:core-android"))
14+
api(project(":workflow-ui:core-common"))
1415

1516
implementation(libs.androidx.appcompat)
1617
implementation(libs.androidx.recyclerview)
@@ -20,7 +21,6 @@ dependencies {
2021
implementation(libs.timber)
2122

2223
implementation(project(":samples:containers:android"))
23-
implementation(project(":workflow-runtime"))
2424

2525
testImplementation(libs.junit)
2626
testImplementation(libs.kotlinx.coroutines.test)

0 commit comments

Comments
 (0)