Skip to content

Commit

Permalink
apply dependency-analysis-android-gradle-plugin recommendations
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
RBusarow committed Aug 1, 2022
1 parent af41667 commit 5d51217
Show file tree
Hide file tree
Showing 42 changed files with 169 additions and 125 deletions.
9 changes: 9 additions & 0 deletions benchmarks/performance-poetry/complex-poetry/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,26 @@ dependencies {

// API on an app module so these are transitive dependencies for the benchmarks.
api(project(":samples:containers:android"))
api(project(":samples:containers:common"))
api(project(":samples:containers:poetry"))
api(project(":workflow-core"))
api(project(":workflow-runtime"))
api(project(":workflow-ui:core-android"))
api(project(":workflow-ui:core-common"))

debugImplementation(libs.squareup.leakcanary.android)

implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.lifecycle.viewmodel.core)
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
// Used to side load Baseline Profile when Benchmarking and not installed by Play Store.
implementation(libs.androidx.profileinstaller)
implementation(libs.androidx.recyclerview)
implementation(libs.androidx.savedstate)
implementation(libs.androidx.test.uiautomator)
implementation(libs.androidx.tracing.core)
implementation(libs.androidx.tracing.ktx)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.timber)
}
21 changes: 19 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ targetSdk = "30"
androidx-activity = "1.3.0"
androidx-appcompat = "1.3.1"
androidx-benchmark = "1.1.0-rc03"
androidx-cardview = "1.0.0"
androidx-compose = "1.1.0-rc01"
androidx-compose-compiler = "1.1.0-rc02"
androidx-constraintlayout = "2.1.2"
Expand Down Expand Up @@ -108,15 +109,22 @@ androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref

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

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

androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidx-compose" }
androidx-compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "androidx-compose" }

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

androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "androidx-compose" }
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable", version.ref = "androidx-compose" }

androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose" }
androidx-compose-ui-geometry = { module = "androidx.compose.ui:ui-geometry", version.ref = "androidx-compose" }
androidx-compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics", version.ref = "androidx-compose" }
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose" }

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

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

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

androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "androidx-lifecycle" }
androidx-lifecycle-core = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "androidx-lifecycle" }
androidx-lifecycle-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-testing = { module = "androidx.lifecycle:lifecycle-runtime-testing", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-core = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-lifecycle-viewmodel-savedstate = { module = "androidx.lifecycle:lifecycle-viewmodel-savedstate", version.ref = "androidx-lifecycle" }

androidx-macro-benchmark = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark" }

androidx-profileinstaller = { module = "androidx.profileinstaller:profileinstaller", version.ref = "androidx-profileinstaller" }

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

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

androidx-tracing-core = { module = "androidx.tracing:tracing", version.ref = "androidx-tracing" }
androidx-tracing-ktx = { module = "androidx.tracing:tracing-ktx", version.ref = "androidx-tracing" }

androidx-transition = { module = "androidx.transition:transition", version.ref = "androidx-transition" }
Expand Down Expand Up @@ -178,6 +191,7 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
kotlin-serialization-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlin-test-annotations = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" }
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
kotlin-test-core = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-jdk = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }

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

mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito-core" }

mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockito-kotlin" }

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

reactivestreams = "org.reactivestreams:reactive-streams:1.0.3"

robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
robolectric-annotations = { module = "org.robolectric:annotations", version.ref = "robolectric" }

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

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

squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "squareup-moshi" }
squareup-moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "squareup-moshi" }
Expand Down
1 change: 1 addition & 0 deletions internal-testing-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies {
implementation(libs.kotlin.jdk8)

testImplementation(libs.junit)
testImplementation(libs.kotlin.test.core)
testImplementation(libs.kotlin.test.jdk)
testImplementation(libs.truth)
}
9 changes: 9 additions & 0 deletions samples/compose-samples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,25 @@ dependencies {
debugImplementation(libs.squareup.leakcanary.android)

implementation(libs.androidx.activity.compose)
implementation(libs.androidx.activity.core)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.foundation.layout)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.geometry)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
implementation(libs.androidx.viewbinding)
implementation(libs.kotlin.common)
// For the LayoutInspector.
implementation(libs.kotlin.reflect)

implementation(project(":workflow-ui:compose"))
implementation(project(":workflow-ui:compose-tooling"))
implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
7 changes: 3 additions & 4 deletions samples/containers/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ dependencies {
api(libs.kotlin.jdk6)

api(project(":samples:containers:common"))
api(project(":workflow-core"))
api(project(":workflow-ui:container-android"))
api(project(":workflow-ui:core-android"))
api(project(":workflow-ui:core-common"))

implementation(libs.androidx.appcompat)
implementation(libs.androidx.core)
implementation(libs.androidx.savedstate)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.coroutines.core)

implementation(project(":workflow-runtime"))
}
1 change: 0 additions & 1 deletion samples/containers/app-poetry/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ dependencies {

implementation(project(":samples:containers:android"))
implementation(project(":samples:containers:poetry"))
implementation(project(":workflow-ui:core-android"))
}
1 change: 0 additions & 1 deletion samples/containers/app-raven/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ dependencies {

implementation(project(":samples:containers:android"))
implementation(project(":samples:containers:poetry"))
implementation(project(":workflow-ui:core-android"))
}
7 changes: 2 additions & 5 deletions samples/containers/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ plugins {
}

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

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

testImplementation(libs.hamcrest)
testImplementation(libs.junit)
testImplementation(libs.kotlin.test.jdk)
testImplementation(libs.truth)

testImplementation(project(":workflow-testing"))
}
2 changes: 2 additions & 0 deletions samples/containers/hello-back-button/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ dependencies {
implementation(libs.androidx.activity.ktx)

implementation(project(":samples:containers:android"))
implementation(project(":workflow-ui:container-android"))
implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
4 changes: 2 additions & 2 deletions samples/containers/poetry/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ dependencies {

api(project(":samples:containers:common"))
api(project(":workflow-core"))
api(project(":workflow-ui:container-android"))
api(project(":workflow-ui:core-android"))
api(project(":workflow-ui:core-common"))

implementation(libs.androidx.appcompat)
implementation(libs.androidx.recyclerview)
Expand All @@ -20,7 +21,6 @@ dependencies {
implementation(libs.timber)

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

testImplementation(libs.junit)
testImplementation(libs.kotlinx.coroutines.test)
Expand Down
9 changes: 9 additions & 0 deletions samples/dungeon/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,29 @@ dependencies {
debugImplementation(libs.squareup.leakcanary.android)

implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.cardview)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.gridlayout)
// Used to side load Baseline Profile when Benchmarking.
implementation(libs.androidx.profileinstaller)
implementation(libs.androidx.recyclerview)
implementation(libs.google.android.material)
implementation(libs.kotlin.common)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.rx2)
implementation(libs.rxjava2.rxandroid)
implementation(libs.squareup.cycler)
implementation(libs.squareup.okio)

implementation(project(":samples:dungeon:common"))
implementation(project(":samples:dungeon:timemachine"))
implementation(project(":samples:dungeon:timemachine-shakeable"))
implementation(project(":workflow-tracing"))
implementation(project(":workflow-ui:container-android"))
implementation(project(":workflow-ui:container-common"))
implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))

testImplementation(libs.junit)
testImplementation(libs.truth)
Expand Down
13 changes: 8 additions & 5 deletions samples/dungeon/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ plugins {
}

dependencies {
api(libs.squareup.okio)

api(project(":workflow-core"))
api(project(":workflow-ui:core-common"))

implementation(libs.kotlin.jdk8)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)

implementation(project(":workflow-core"))
implementation(project(":workflow-ui:core-common"))

testImplementation(libs.junit)
testImplementation(libs.kotlin.test.core)
testImplementation(libs.kotlin.test.jdk)
testImplementation(libs.truth)

testImplementation(project(":workflow-testing"))
}
9 changes: 7 additions & 2 deletions samples/dungeon/timemachine-shakeable/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ plugins {
}

dependencies {
api(libs.kotlinx.coroutines.core)

api(project(":samples:dungeon:timemachine"))
api(project(":workflow-core"))
api(project(":workflow-ui:core-android"))
api(project(":workflow-ui:core-common"))

implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.transition)
implementation(libs.google.android.material)
implementation(libs.kotlin.jdk8)
implementation(libs.squareup.seismic)

implementation(project(":workflow-ui:core-android"))
}
5 changes: 3 additions & 2 deletions samples/dungeon/timemachine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ plugins {
}

dependencies {
implementation(libs.kotlin.jdk8)
api(project(":workflow-core"))

implementation(project(":workflow-core"))
implementation(libs.kotlin.jdk8)

testImplementation(libs.hamcrest)
testImplementation(libs.junit)
testImplementation(libs.kotlin.test.core)
testImplementation(libs.kotlin.test.jdk)
testImplementation(libs.truth)

Expand Down
3 changes: 2 additions & 1 deletion samples/hello-terminal/hello-terminal-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ plugins {
application.mainClassName = "com.squareup.sample.helloterminal.MainKt"

dependencies {
implementation(libs.kotlinx.coroutines.core)

implementation(project(":samples:hello-terminal:terminal-workflow"))
implementation(project(":workflow-core"))
implementation(project(":workflow-runtime"))
}
5 changes: 4 additions & 1 deletion samples/hello-terminal/terminal-workflow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ plugins {
}

dependencies {
api(libs.kotlinx.coroutines.core)

api(project(":workflow-core"))

implementation(libs.lanterna)

implementation(project(":workflow-core"))
implementation(project(":workflow-runtime"))
}
3 changes: 2 additions & 1 deletion samples/hello-terminal/todo-terminal-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ plugins {
application.mainClassName = "com.squareup.sample.hellotodo.MainKt"

dependencies {
implementation(libs.kotlinx.coroutines.core)

implementation(project(":samples:hello-terminal:terminal-workflow"))
implementation(project(":workflow-core"))
implementation(project(":workflow-runtime"))
}
1 change: 1 addition & 0 deletions samples/hello-workflow-fragment/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ dependencies {
implementation(libs.androidx.lifecycle.viewmodel.savedstate)

implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
1 change: 1 addition & 0 deletions samples/hello-workflow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ dependencies {
implementation(libs.androidx.viewbinding)

implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
1 change: 1 addition & 0 deletions samples/stub-visibility/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ dependencies {
implementation(libs.androidx.viewbinding)

implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
6 changes: 6 additions & 0 deletions samples/tictactoe/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ dependencies {
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.lifecycle.ktx)
implementation(libs.androidx.lifecycle.viewmodel.core)
implementation(libs.androidx.test.espresso.idlingResource)
implementation(libs.androidx.transition)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.rxjava2.rxandroid)
implementation(libs.rxjava2.rxjava)
implementation(libs.squareup.okio)
implementation(libs.timber)

implementation(project(":samples:containers:android"))
implementation(project(":samples:tictactoe:common"))
implementation(project(":workflow-tracing"))
implementation(project(":workflow-ui:container-android"))
implementation(project(":workflow-ui:core-android"))
implementation(project(":workflow-ui:core-common"))
}
Loading

0 comments on commit 5d51217

Please sign in to comment.