From 0eae1c84fa5444eccf5af652c270b3e739e465a8 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 30 Jun 2026 12:48:07 +0400 Subject: [PATCH] Updated on 2026-08-14 --- core/ab-tests/build.gradle.kts | 21 +++--- core/analytics/build.gradle.kts | 39 +++++++---- core/config-toggles/build.gradle.kts | 21 ++++-- core/datasource/build.gradle.kts | 91 ++++++++++++++------------ core/decompose/build.gradle.kts | 23 +++++-- core/error/ext/build.gradle.kts | 11 +++- core/navigation/build.gradle.kts | 10 +-- core/pagination/build.gradle.kts | 4 +- core/res/build.gradle.kts | 11 +++- core/ui/build.gradle.kts | 97 +++++++++++++++++----------- gradle/dependencies.toml | 4 ++ 11 files changed, 207 insertions(+), 125 deletions(-) diff --git a/core/ab-tests/build.gradle.kts b/core/ab-tests/build.gradle.kts index f557fcda9e..5bdf327035 100644 --- a/core/ab-tests/build.gradle.kts +++ b/core/ab-tests/build.gradle.kts @@ -3,7 +3,6 @@ plugins { alias(deps.plugins.kotlin.android) alias(deps.plugins.kotlin.kapt) alias(deps.plugins.hilt.android) - alias(deps.plugins.ksp) id("configuration") } @@ -12,19 +11,23 @@ android { } dependencies { - /** DI */ + + // region DI implementation(deps.hilt.android) kapt(deps.hilt.kapt) + // endregion - /** Other libraries */ + // region Kotlin + implementation(deps.kotlin.coroutines) + // endregion - /** Core modules */ + // region Other libraries + implementation(deps.amplitude.experiment) + // endregion + + // region Core modules implementation(projects.core.analytics.models) implementation(projects.core.datasource) implementation(projects.core.utils) - - implementation(projects.domain.models) - - /** Amplitude experiment */ - implementation(deps.amplitude.experiment) + // endregion } \ No newline at end of file diff --git a/core/analytics/build.gradle.kts b/core/analytics/build.gradle.kts index d5612594b1..71e794445a 100644 --- a/core/analytics/build.gradle.kts +++ b/core/analytics/build.gradle.kts @@ -3,28 +3,39 @@ plugins { alias(deps.plugins.kotlin.kapt) id("configuration") } + dependencies { - /** DI */ + // region DI implementation(deps.hilt.core) kapt(deps.hilt.kapt) + // endregion - /** Analytics - Models */ - api(projects.core.analytics.models) - - /** Domain */ - implementation(projects.domain.analytics) - implementation(projects.domain.models) - - /** Other */ + // region Kotlin implementation(deps.kotlin.coroutines) + // endregion - /** Core shouldn't depend on core, but in case with utils and logging its necessary */ + // region Tangem + implementation(tangemDeps.card.core) // for calculating user id hash + // endregion + + // region Core modules + api(projects.core.analytics.models) + // Core shouldn't depend on core, but with utils and logging it's necessary. implementation(projects.core.utils) + // endregion - /** For calculating user id hash */ - implementation(tangemDeps.card.core) + // region Domain + api(projects.domain.analytics) + // endregion - /** Tests */ - testImplementation(projects.test.core) + // region Domain models + api(projects.domain.models) + // endregion + + // region Tests + testImplementation(deps.test.junit5) + testImplementation(deps.test.mockk) + testImplementation(deps.test.truth) + // endregion } \ No newline at end of file diff --git a/core/config-toggles/build.gradle.kts b/core/config-toggles/build.gradle.kts index 61afe91a6c..ff6e259e88 100644 --- a/core/config-toggles/build.gradle.kts +++ b/core/config-toggles/build.gradle.kts @@ -63,21 +63,32 @@ tasks.withType().configureEach { exclude { it.file.absolutePath.contains("/build/generated/") } } dependencies { - /** DI */ + + // region DI implementation(deps.hilt.android) kapt(deps.hilt.kapt) + // endregion - /** Local storages */ + // region Kotlin + implementation(deps.kotlin.coroutines) + // endregion + + // region AndroidX + implementation(deps.androidx.annotation) implementation(deps.androidx.datastore) + // endregion - /** Other libraries */ + // region Other libraries implementation(deps.moshi) - implementation(deps.moshi.kotlin) ksp(deps.moshi.kotlin.codegen) + // endregion - /** Core modules */ + // region Core modules implementation(projects.core.datasource) implementation(projects.core.utils) + // endregion + // region Tests testImplementation(projects.test.core) + // endregion } \ No newline at end of file diff --git a/core/datasource/build.gradle.kts b/core/datasource/build.gradle.kts index 0d1c7f9689..34d70a50ec 100644 --- a/core/datasource/build.gradle.kts +++ b/core/datasource/build.gradle.kts @@ -60,70 +60,79 @@ androidComponents { } dependencies { - /** Project */ - implementation(projects.core.analytics) - implementation(projects.core.utils) - implementation(projects.core.res) - implementation(projects.domain.appTheme.models) - implementation(projects.domain.core) - implementation(projects.domain.tokens.models) - implementation(projects.domain.wallets.models) - implementation(projects.domain.balanceHiding.models) - implementation(projects.domain.txhistory.models) - implementation(projects.domain.staking.models) - implementation(projects.domain.onramp.models) - implementation(projects.domain.models) - implementation(projects.domain.nft.models) - implementation(projects.domain.walletConnect.models) - implementation(projects.domain.yieldSupply.models) - implementation(projects.domain.visa.models) - - /** Tangem libraries */ - implementation(tangemDeps.blockchain) - implementation(tangemDeps.card.core) - - /** DI */ + // region DI implementation(deps.hilt.android) kapt(deps.hilt.kapt) + // endregion - /** Coroutines */ - implementation(deps.kotlin.coroutines) - implementation(deps.kotlin.coroutines.rx2) + // region Kotlin + api(deps.kotlin.coroutines) api(deps.kotlin.datetime) api(deps.kotlin.serialization) + // endregion - /** Logging */ + // region AndroidX + implementation(deps.androidx.core) + api(deps.androidx.datastore) + // endregion - /** Network */ + // region Network api(deps.moshi) - implementation(deps.moshi.kotlin) implementation(deps.moshi.adapters) implementation(deps.moshi.adapters.ext) + implementation(deps.moshi.kotlin) + ksp(deps.moshi.kotlin.codegen) api(deps.okHttp) implementation(deps.okHttp.prettyLogging) + implementation(deps.okio) api(deps.retrofit) - implementation(deps.retrofit.moshi) - ksp(deps.moshi.kotlin.codegen) + api(deps.retrofit.moshi) kaptForObfuscatingVariants(deps.retrofit.response.type.keeper) + // endregion - /** Time */ - implementation(deps.jodatime) + // region Room + api(deps.room.runtime) + ksp(deps.room.compiler) + // endregion - /** Security */ - implementation(deps.spongecastle.core) + // region Other libraries + api(deps.jodatime) + runtimeOnly(deps.spongecastle.core) + // endregion - /** Chucker */ + // region Chucker debugImplementation(deps.chucker) mockedImplementation(deps.chucker) externalImplementation(deps.chuckerStub) internalImplementation(deps.chuckerStub) releaseImplementation(deps.chuckerStub) + // endregion - /** Local storages */ - api(deps.androidx.datastore) - implementation(deps.room.runtime) - implementation(deps.room.ktx) - ksp(deps.room.compiler) + // region Tangem + api(tangemDeps.blockchain) + api(tangemDeps.card.core) + // endregion + // region Core modules + api(projects.core.analytics) + implementation(projects.core.analytics.models) + api(projects.core.utils) + implementation(projects.core.res) + // endregion + + // region Domain models + api(projects.domain.models) + api(projects.domain.nft.models) + api(projects.domain.onramp.models) + api(projects.domain.staking.models) + api(projects.domain.txhistory.models) + api(projects.domain.visa.models) + api(projects.domain.walletConnect.models) + api(projects.domain.wallets.models) + api(projects.domain.yieldSupply.models) + // endregion + + // region Tests testImplementation(projects.test.core) + // endregion } \ No newline at end of file diff --git a/core/decompose/build.gradle.kts b/core/decompose/build.gradle.kts index 792dbe9a1c..b7293e790b 100644 --- a/core/decompose/build.gradle.kts +++ b/core/decompose/build.gradle.kts @@ -10,12 +10,25 @@ android { } dependencies { - api(projects.core.utils) - - api(deps.decompose) - api(deps.androidx.appCompat) - implementation(deps.kotlin.coroutines) + // region DI implementation(deps.hilt.core) kapt(deps.hilt.kapt) + // endregion + + // region Kotlin + api(deps.kotlin.coroutines) + // endregion + + // region AndroidX + api(deps.androidx.appCompat) + // endregion + + // region Other libraries + api(deps.decompose) + // endregion + + // region Core modules + api(projects.core.utils) + // endregion } \ No newline at end of file diff --git a/core/error/ext/build.gradle.kts b/core/error/ext/build.gradle.kts index f6e50d5bd6..416f10a38f 100644 --- a/core/error/ext/build.gradle.kts +++ b/core/error/ext/build.gradle.kts @@ -9,8 +9,13 @@ android { } dependencies { - api(projects.core.error) - implementation(tangemDeps.card.core) - implementation(tangemDeps.blockchain) + // region Tangem + api(tangemDeps.blockchain) + api(tangemDeps.card.core) + // endregion + + // region Core modules + api(projects.core.error) + // endregion } \ No newline at end of file diff --git a/core/navigation/build.gradle.kts b/core/navigation/build.gradle.kts index c2e83ab662..4895789589 100644 --- a/core/navigation/build.gradle.kts +++ b/core/navigation/build.gradle.kts @@ -1,8 +1,6 @@ plugins { alias(deps.plugins.android.library) alias(deps.plugins.kotlin.android) - alias(deps.plugins.kotlin.kapt) - alias(deps.plugins.hilt.android) id("configuration") } @@ -11,10 +9,12 @@ android { } dependencies { - implementation(projects.core.utils) + // region DI implementation(deps.hilt.android) - kapt(deps.hilt.kapt) + // endregion - implementation(deps.material) + // region AndroidX + implementation(deps.androidx.core) + // endregion } \ No newline at end of file diff --git a/core/pagination/build.gradle.kts b/core/pagination/build.gradle.kts index c7b5d3d97a..3736e48bf8 100644 --- a/core/pagination/build.gradle.kts +++ b/core/pagination/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - // region Coroutines - implementation(deps.kotlin.coroutines) + // region Kotlin + api(deps.kotlin.coroutines) // endregion } \ No newline at end of file diff --git a/core/res/build.gradle.kts b/core/res/build.gradle.kts index 9fe72ddbb5..6190f22419 100644 --- a/core/res/build.gradle.kts +++ b/core/res/build.gradle.kts @@ -10,12 +10,17 @@ android { dependencies { - implementation(projects.core.utils) + // region AndroidX + api(deps.androidx.annotation) + // endregion - - // region Firebase libraries + // region Firebase implementation(platform(deps.firebase.bom)) implementation(deps.firebase.analytics) implementation(deps.firebase.crashlytics) // endregion + + // region Core modules + implementation(projects.core.utils) + // endregion } \ No newline at end of file diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 7f42a94a4e..df7ac62a96 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -109,51 +109,53 @@ tasks.named("preBuild") { } dependencies { - /** Project - Domain */ - implementation(projects.domain.appTheme.models) - implementation(projects.domain.express.models) - implementation(projects.domain.models) - implementation(projects.domain.tokens.models) - /** Project - Core */ - implementation(projects.core.res) - implementation(projects.core.utils) - api(projects.core.decompose) - implementation(projects.core.error) + // region DI + implementation(deps.hilt.android) + // endregion - /** AndroidX libraries */ - implementation(deps.androidx.fragment.ktx) + // region Kotlin + api(deps.kotlin.coroutines) + api(deps.kotlin.immutable.collections) + api(deps.kotlin.serialization.core) + // endregion + + // region Compose + implementation(deps.compose.accompanist.permission) + api(deps.compose.accompanist.systemUiController) + api(deps.compose.coil) + implementation(deps.compose.constraintLayout) + api(deps.compose.foundation) + api(deps.compose.material3) + api(deps.compose.paging) + api(deps.compose.reorderable) + api(deps.compose.shimmer) + implementation(deps.compose.ui.tooling) + implementation(deps.compose.ui.utils) + // endregion + + // region AndroidX + api(deps.androidx.activity) + implementation(deps.androidx.activity.compose) + implementation(deps.androidx.annotation) + implementation(deps.androidx.appCompat) + implementation(deps.androidx.core) + implementation(deps.androidx.core.ktx) implementation(deps.androidx.paging.runtime) - implementation(deps.lifecycle.runtime.ktx) - implementation(deps.androidx.palette) + api(deps.androidx.palette) + implementation(deps.androidx.savedState) implementation(deps.androidx.windowManager) { exclude( deps.kotlin.coroutines.android.get().module.group, - deps.kotlin.coroutines.android.get().module.name + deps.kotlin.coroutines.android.get().module.name, ) } + api(deps.lifecycle.compose) + api(deps.lifecycle.runtime.ktx) + // endregion - /** Compose */ - implementation(deps.compose.constraintLayout) - implementation(deps.compose.foundation) - implementation(deps.compose.material3) - implementation(deps.compose.paging) - implementation(deps.compose.ui.tooling) - implementation(deps.compose.ui.utils) - implementation(deps.compose.coil) - implementation(deps.compose.navigation) - implementation(deps.compose.navigation.hilt) - api(deps.compose.reorderable) - - /** Other libraries */ - implementation(deps.compose.accompanist.systemUiController) - implementation(deps.compose.accompanist.permission) - implementation(deps.material) - implementation(deps.compose.shimmer) - implementation(deps.kotlin.immutable.collections) - implementation(deps.zxing.qrCore) - api(deps.jodatime) - implementation(deps.markdown) + // region Other libraries + api(deps.arrow.core) api(deps.haze) { exclude(module = "activity-compose") exclude(module = "activity") @@ -164,9 +166,28 @@ dependencies { exclude(module = "activity") exclude(module = "activity-ktx") } + api(deps.jodatime) + api(deps.markdown) + implementation(deps.material) + implementation(deps.zxing.qrCore) + // endregion - /** Tests */ + // region Core modules + api(projects.core.decompose) + api(projects.core.error) + implementation(projects.core.res) + implementation(projects.core.utils) + // endregion + + // region Domain models + api(projects.domain.appTheme.models) + api(projects.domain.express.models) + api(projects.domain.models) + // endregion + + // region Tests + testImplementation(deps.test.junit5) testImplementation(deps.test.mockk) testImplementation(deps.test.truth) - testImplementation(deps.test.junit5) + // endregion } \ No newline at end of file diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 68d82013d6..33f4d8daba 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -27,6 +27,7 @@ androidxBrowser = "1.4.0" androidxConstraintLayout = "2.2.1" androidxCore = "1.13.1" androidxKtx = "1.9.0" +androidxSavedState = "1.3.3" androidxSplashScreen = "1.0.1" androidxFragment = "1.8.5" androidxLifecycle = "2.5.1" @@ -76,6 +77,7 @@ lottie-compose = "6.6.0" moshi = "1.15.1" moshiAdaptersExt = "0.1.5" okhttp = "4.9.3" +okio = "3.7.0" retrofit = "2.11.0" retrofitMoshiConverter = "2.9.0" spongycastleCryptoCore = "1.58.0.0" @@ -169,6 +171,7 @@ androidx-fragment-compose = { module = "androidx.fragment:fragment-compose", ver androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "androidx-paging" } androidx-swipeRefreshLayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "swipeRefreshLayout" } androidx-palette = { module = "androidx.palette:palette", version.ref = "androidx-palette" } +androidx-savedState = { module = "androidx.savedstate:savedstate", version.ref = "androidxSavedState" } androidx-windowManager = { group = "androidx.window", name = "window", version.ref = "androidxWindowManager" } lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidxLifecycle" } lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidxLifecycle" } @@ -282,6 +285,7 @@ moshi-adapters-ext = { module = "dev.onenowy.moshipolymorphicadapter:moshi-polym moshi-kotlin-codegen = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshi" } okHttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } okHttp-prettyLogging = { module = "com.github.ihsanbal:LoggingInterceptor", version.ref = "okHttp-prettyLogging" } +okio = { module = "com.squareup.okio:okio", version.ref = "okio" } spongecastle-core = { module = "com.madgag.spongycastle:core", version.ref = "spongycastleCryptoCore" } retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } retrofit-response-type-keeper = { module = "com.squareup.retrofit2:response-type-keeper", version.ref = "retrofit" }