From 8ec54d19d8fe55ce4133516f476a8ebc8086873f Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 12 Mar 2023 11:47:22 +0100 Subject: [PATCH] Sort and group Gradle dependencies thanks to square/gradle-dependencies-sorter --- app-nia-catalog/build.gradle.kts | 5 ++--- benchmarks/build.gradle.kts | 4 ++-- build-logic/convention/build.gradle.kts | 4 ++-- core/analytics/build.gradle.kts | 5 ++--- core/data/build.gradle.kts | 14 ++++++------- core/datastore-test/build.gradle.kts | 4 ++-- core/datastore/build.gradle.kts | 10 ++++----- core/designsystem/build.gradle.kts | 14 ++++++++----- core/domain/build.gradle.kts | 8 +++---- core/network/build.gradle.kts | 11 ++++------ core/testing/build.gradle.kts | 24 ++++++++++----------- core/ui/build.gradle.kts | 28 ++++++++++++------------- feature/foryou/build.gradle.kts | 3 +-- sync/work/build.gradle.kts | 16 +++++++------- 14 files changed, 69 insertions(+), 81 deletions(-) diff --git a/app-nia-catalog/build.gradle.kts b/app-nia-catalog/build.gradle.kts index 8232350d9..bf0695fd3 100644 --- a/app-nia-catalog/build.gradle.kts +++ b/app-nia-catalog/build.gradle.kts @@ -65,9 +65,8 @@ android { } dependencies { - implementation(project(":core:ui")) implementation(project(":core:designsystem")) - - implementation(libs.androidx.activity.compose) + implementation(project(":core:ui")) implementation(libs.accompanist.flowlayout) + implementation(libs.androidx.activity.compose) } diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 9af89d98d..fa8aeefb0 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -68,13 +68,13 @@ android { } dependencies { + implementation(libs.androidx.benchmark.macro) implementation(libs.androidx.test.core) implementation(libs.androidx.test.espresso.core) implementation(libs.androidx.test.ext) - implementation(libs.androidx.test.runner) implementation(libs.androidx.test.rules) + implementation(libs.androidx.test.runner) implementation(libs.androidx.test.uiautomator) - implementation(libs.androidx.benchmark.macro) } androidComponents { diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index 0b929d4f7..281434b87 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -27,9 +27,9 @@ java { dependencies { compileOnly(libs.android.gradlePlugin) - compileOnly(libs.kotlin.gradlePlugin) - compileOnly(libs.firebase.performance.gradle) compileOnly(libs.firebase.crashlytics.gradle) + compileOnly(libs.firebase.performance.gradle) + compileOnly(libs.kotlin.gradlePlugin) compileOnly(libs.ksp.gradlePlugin) } diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts index e42499769..8c573b854 100644 --- a/core/analytics/build.gradle.kts +++ b/core/analytics/build.gradle.kts @@ -24,10 +24,9 @@ android { } dependencies { - implementation(libs.kotlinx.coroutines.android) + implementation(platform(libs.firebase.bom)) implementation(libs.androidx.compose.runtime) implementation(libs.androidx.core.ktx) - - implementation(platform(libs.firebase.bom)) implementation(libs.firebase.analytics) + implementation(libs.kotlinx.coroutines.android) } diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 5b468c43e..e4b265649 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -30,19 +30,17 @@ android { } dependencies { + implementation(project(":core:analytics")) implementation(project(":core:common")) - implementation(project(":core:model")) implementation(project(":core:database")) implementation(project(":core:datastore")) + implementation(project(":core:model")) implementation(project(":core:network")) - implementation(project(":core:analytics")) - - testImplementation(project(":core:testing")) - testImplementation(project(":core:datastore-test")) - implementation(libs.androidx.core.ktx) - - implementation(libs.kotlinx.datetime) implementation(libs.kotlinx.coroutines.android) + implementation(libs.kotlinx.datetime) implementation(libs.kotlinx.serialization.json) + + testImplementation(project(":core:datastore-test")) + testImplementation(project(":core:testing")) } \ No newline at end of file diff --git a/core/datastore-test/build.gradle.kts b/core/datastore-test/build.gradle.kts index d8223c3f3..c7c423c25 100644 --- a/core/datastore-test/build.gradle.kts +++ b/core/datastore-test/build.gradle.kts @@ -24,8 +24,8 @@ android { dependencies { api(project(":core:datastore")) + api(libs.androidx.dataStore.core) + implementation(project(":core:common")) implementation(project(":core:testing")) - - api(libs.androidx.dataStore.core) } diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index 8f3d7ece6..f2c6c1892 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -57,12 +57,10 @@ protobuf { dependencies { implementation(project(":core:common")) implementation(project(":core:model")) - - testImplementation(project(":core:testing")) - testImplementation(project(":core:datastore-test")) - - implementation(libs.kotlinx.coroutines.android) - implementation(libs.androidx.dataStore.core) + implementation(libs.kotlinx.coroutines.android) implementation(libs.protobuf.kotlin.lite) + + testImplementation(project(":core:datastore-test")) + testImplementation(project(":core:testing")) } diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index 1bcc9d65c..a40926383 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -30,16 +30,20 @@ android { } dependencies { - implementation(libs.androidx.core.ktx) - implementation(libs.coil.kt.compose) + lintPublish(project(":lint")) + api(libs.androidx.compose.foundation) api(libs.androidx.compose.foundation.layout) api(libs.androidx.compose.material.iconsExtended) api(libs.androidx.compose.material3) - debugApi(libs.androidx.compose.ui.tooling) + api(libs.androidx.compose.runtime) api(libs.androidx.compose.ui.tooling.preview) api(libs.androidx.compose.ui.util) - api(libs.androidx.compose.runtime) - lintPublish(project(":lint")) + + debugApi(libs.androidx.compose.ui.tooling) + + implementation(libs.androidx.core.ktx) + implementation(libs.coil.kt.compose) + androidTestImplementation(project(":core:testing")) } diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 8483d890c..0e3949aa3 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -24,15 +24,13 @@ android { } dependencies { - implementation(project(":core:data")) implementation(project(":core:model")) - - testImplementation(project(":core:testing")) - + implementation(libs.hilt.android) implementation(libs.kotlinx.coroutines.android) implementation(libs.kotlinx.datetime) - implementation(libs.hilt.android) kapt(libs.hilt.compiler) + + testImplementation(project(":core:testing")) } \ No newline at end of file diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 97a68b3a5..633e2573d 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -41,17 +41,14 @@ secrets { dependencies { implementation(project(":core:common")) implementation(project(":core:model")) - - testImplementation(project(":core:testing")) - + implementation(libs.coil.kt) + implementation(libs.coil.kt.svg) implementation(libs.kotlinx.coroutines.android) - implementation(libs.kotlinx.serialization.json) implementation(libs.kotlinx.datetime) - + implementation(libs.kotlinx.serialization.json) implementation(libs.okhttp.logging) implementation(libs.retrofit.core) implementation(libs.retrofit.kotlin.serialization) - implementation(libs.coil.kt) - implementation(libs.coil.kt.svg) + testImplementation(project(":core:testing")) } diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts index 5e0c3e409..4e87bb039 100644 --- a/core/testing/build.gradle.kts +++ b/core/testing/build.gradle.kts @@ -24,23 +24,21 @@ android { } dependencies { - implementation(project(":core:common")) - implementation(project(":core:data")) - implementation(project(":core:domain")) - implementation(project(":core:model")) - - implementation(libs.kotlinx.datetime) - - api(libs.junit4) + api(libs.androidx.compose.ui.test) api(libs.androidx.test.core) - api(libs.kotlinx.coroutines.test) - api(libs.turbine) - api(libs.androidx.test.espresso.core) - api(libs.androidx.test.runner) api(libs.androidx.test.rules) - api(libs.androidx.compose.ui.test) + api(libs.androidx.test.runner) api(libs.hilt.android.testing) + api(libs.junit4) + api(libs.kotlinx.coroutines.test) + api(libs.turbine) debugApi(libs.androidx.compose.ui.testManifest) + + implementation(project(":core:common")) + implementation(project(":core:data")) + implementation(project(":core:domain")) + implementation(project(":core:model")) + implementation(libs.kotlinx.datetime) } diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 0438b8f36..b7280e757 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -27,28 +27,28 @@ android { } dependencies { - implementation(project(":core:designsystem")) - implementation(project(":core:model")) - implementation(project(":core:domain")) - implementation(project(":core:analytics")) - - implementation(libs.androidx.browser) - implementation(libs.androidx.core.ktx) - implementation(libs.coil.kt) - implementation(libs.coil.kt.compose) - implementation(libs.kotlinx.datetime) - api(libs.androidx.compose.foundation) api(libs.androidx.compose.foundation.layout) api(libs.androidx.compose.material.iconsExtended) api(libs.androidx.compose.material3) - debugApi(libs.androidx.compose.ui.tooling) - api(libs.androidx.compose.ui.tooling.preview) - api(libs.androidx.compose.ui.util) api(libs.androidx.compose.runtime) api(libs.androidx.compose.runtime.livedata) + api(libs.androidx.compose.ui.tooling.preview) + api(libs.androidx.compose.ui.util) api(libs.androidx.metrics) api(libs.androidx.tracing.ktx) + debugApi(libs.androidx.compose.ui.tooling) + + implementation(project(":core:analytics")) + implementation(project(":core:designsystem")) + implementation(project(":core:domain")) + implementation(project(":core:model")) + implementation(libs.androidx.browser) + implementation(libs.androidx.core.ktx) + implementation(libs.coil.kt) + implementation(libs.coil.kt.compose) + implementation(libs.kotlinx.datetime) + androidTestImplementation(project(":core:testing")) } \ No newline at end of file diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index ed7be27dc..4fa032a88 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -27,7 +27,6 @@ android { } dependencies { - implementation(libs.kotlinx.datetime) - implementation(libs.accompanist.flowlayout) + implementation(libs.kotlinx.datetime) } diff --git a/sync/work/build.gradle.kts b/sync/work/build.gradle.kts index a3b589db3..b5b3bdb68 100644 --- a/sync/work/build.gradle.kts +++ b/sync/work/build.gradle.kts @@ -27,24 +27,22 @@ android { } dependencies { + implementation(project(":core:analytics")) implementation(project(":core:common")) - implementation(project(":core:model")) implementation(project(":core:data")) implementation(project(":core:datastore")) - implementation(project(":core:analytics")) - - implementation(libs.kotlinx.coroutines.android) - + implementation(project(":core:model")) implementation(libs.androidx.lifecycle.livedata.ktx) - implementation(libs.androidx.tracing.ktx) implementation(libs.androidx.startup) + implementation(libs.androidx.tracing.ktx) implementation(libs.androidx.work.ktx) implementation(libs.hilt.ext.work) - - testImplementation(project(":core:testing")) - androidTestImplementation(project(":core:testing")) + implementation(libs.kotlinx.coroutines.android) kapt(libs.hilt.ext.compiler) + testImplementation(project(":core:testing")) + + androidTestImplementation(project(":core:testing")) androidTestImplementation(libs.androidx.work.testing) }