diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3cf379b69f..2010e7ac69 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,6 +9,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.wallet" +} + configurations.all { exclude(group = "org.bouncycastle", module = "bcprov-jdk15to18") exclude(group = "com.github.komputing.kethereum") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 99e803e45b..4b57ad94ed 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/core/datasource/build.gradle.kts b/core/datasource/build.gradle.kts index 522cd3257e..e4239e40d6 100644 --- a/core/datasource/build.gradle.kts +++ b/core/datasource/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.datasource" +} + dependencies { /** Project */ diff --git a/core/datasource/src/main/AndroidManifest.xml b/core/datasource/src/main/AndroidManifest.xml index a87322003a..f1b5bc5af0 100644 --- a/core/datasource/src/main/AndroidManifest.xml +++ b/core/datasource/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/core/featuretoggles/build.gradle.kts b/core/featuretoggles/build.gradle.kts index 5354b55813..d775494d39 100644 --- a/core/featuretoggles/build.gradle.kts +++ b/core/featuretoggles/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.core.featuretoggles" +} + dependencies { /** DI */ diff --git a/core/featuretoggles/src/main/AndroidManifest.xml b/core/featuretoggles/src/main/AndroidManifest.xml deleted file mode 100644 index f96c64f1db..0000000000 --- a/core/featuretoggles/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/core/res/build.gradle.kts b/core/res/build.gradle.kts index 1fbece85d5..c2fce27feb 100644 --- a/core/res/build.gradle.kts +++ b/core/res/build.gradle.kts @@ -2,4 +2,8 @@ plugins { alias(deps.plugins.android.library) alias(deps.plugins.kotlin.android) id("configuration") +} + +android { + namespace = "com.tangem.core.res" } \ No newline at end of file diff --git a/core/res/src/main/AndroidManifest.xml b/core/res/src/main/AndroidManifest.xml deleted file mode 100644 index 1420909c0e..0000000000 --- a/core/res/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 62f9551fa1..e2abfa0f4b 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -4,6 +4,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.core.ui" +} + dependencies { /** Project - Common */ implementation(projects.common) diff --git a/core/ui/src/main/AndroidManifest.xml b/core/ui/src/main/AndroidManifest.xml deleted file mode 100644 index c5a36c7e17..0000000000 --- a/core/ui/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/data/source/preferences/build.gradle.kts b/data/source/preferences/build.gradle.kts index 7cd9e54515..3768a33a8c 100644 --- a/data/source/preferences/build.gradle.kts +++ b/data/source/preferences/build.gradle.kts @@ -5,6 +5,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.data.source.preferences" +} + dependencies { implementation(deps.androidx.core.ktx) implementation(deps.moshi) diff --git a/data/source/preferences/src/main/AndroidManifest.xml b/data/source/preferences/src/main/AndroidManifest.xml deleted file mode 100644 index 67568f1b9e..0000000000 --- a/data/source/preferences/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/domain/legacy/build.gradle.kts b/domain/legacy/build.gradle.kts index 9a4c2225c2..bc0e716a7a 100644 --- a/domain/legacy/build.gradle.kts +++ b/domain/legacy/build.gradle.kts @@ -4,6 +4,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.domain.features" +} + dependencies { implementation(project(":core:datasource")) implementation(project(":core:utils")) diff --git a/domain/legacy/src/main/AndroidManifest.xml b/domain/legacy/src/main/AndroidManifest.xml deleted file mode 100644 index ea7f515204..0000000000 --- a/domain/legacy/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/features/onboarding/build.gradle.kts b/features/onboarding/build.gradle.kts index 8318108615..6629611e63 100644 --- a/features/onboarding/build.gradle.kts +++ b/features/onboarding/build.gradle.kts @@ -7,6 +7,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.onboarding" +} + dependencies { /** Core modules */ implementation(project(":common")) diff --git a/features/onboarding/src/main/AndroidManifest.xml b/features/onboarding/src/main/AndroidManifest.xml deleted file mode 100644 index 21015a0f53..0000000000 --- a/features/onboarding/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/referral/data/build.gradle.kts b/features/referral/data/build.gradle.kts index 76c384d6d6..5125499148 100644 --- a/features/referral/data/build.gradle.kts +++ b/features/referral/data/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.referral.data" +} + dependencies { /** Project */ diff --git a/features/referral/data/src/main/AndroidManifest.xml b/features/referral/data/src/main/AndroidManifest.xml deleted file mode 100644 index 6f8fe3941b..0000000000 --- a/features/referral/data/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/referral/domain/src/main/AndroidManifest.xml b/features/referral/domain/src/main/AndroidManifest.xml deleted file mode 100644 index ace8d8e355..0000000000 --- a/features/referral/domain/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/referral/presentation/build.gradle.kts b/features/referral/presentation/build.gradle.kts index 280c994188..0a90fdc329 100644 --- a/features/referral/presentation/build.gradle.kts +++ b/features/referral/presentation/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.referral.presentation" +} + dependencies { /** Core modules */ implementation(project(":core:analytics")) diff --git a/features/referral/presentation/src/main/AndroidManifest.xml b/features/referral/presentation/src/main/AndroidManifest.xml deleted file mode 100644 index 4c5a0a1f54..0000000000 --- a/features/referral/presentation/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/swap/api/build.gradle.kts b/features/swap/api/build.gradle.kts index 882b05bd82..76bb25817f 100644 --- a/features/swap/api/build.gradle.kts +++ b/features/swap/api/build.gradle.kts @@ -7,6 +7,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.swap.api" +} + dependencies { /** DI */ implementation(deps.hilt.android) diff --git a/features/swap/api/src/main/AndroidManifest.xml b/features/swap/api/src/main/AndroidManifest.xml deleted file mode 100644 index b46e5ddb0b..0000000000 --- a/features/swap/api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/swap/data/build.gradle.kts b/features/swap/data/build.gradle.kts index 12693598d2..208635ebbd 100644 --- a/features/swap/data/build.gradle.kts +++ b/features/swap/data/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.swap.data" +} + dependencies { /** AndroidX */ diff --git a/features/swap/data/src/main/AndroidManifest.xml b/features/swap/data/src/main/AndroidManifest.xml deleted file mode 100644 index 5981b0aeee..0000000000 --- a/features/swap/data/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/swap/presentation/build.gradle.kts b/features/swap/presentation/build.gradle.kts index a08a338a18..8986bf7e0d 100644 --- a/features/swap/presentation/build.gradle.kts +++ b/features/swap/presentation/build.gradle.kts @@ -7,6 +7,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.swap.presentation" +} + dependencies { /** Core modules */ implementation(projects.core.analytics) diff --git a/features/swap/presentation/src/main/AndroidManifest.xml b/features/swap/presentation/src/main/AndroidManifest.xml deleted file mode 100644 index 927ad53a71..0000000000 --- a/features/swap/presentation/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/tester/api/build.gradle.kts b/features/tester/api/build.gradle.kts index 1fbece85d5..0456459cad 100644 --- a/features/tester/api/build.gradle.kts +++ b/features/tester/api/build.gradle.kts @@ -2,4 +2,8 @@ plugins { alias(deps.plugins.android.library) alias(deps.plugins.kotlin.android) id("configuration") +} + +android { + namespace = "com.tangem.features.tester.api" } \ No newline at end of file diff --git a/features/tester/api/src/main/AndroidManifest.xml b/features/tester/api/src/main/AndroidManifest.xml deleted file mode 100644 index 99ac562598..0000000000 --- a/features/tester/api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/features/tester/impl/build.gradle.kts b/features/tester/impl/build.gradle.kts index 9bc0022b59..86db03dca7 100644 --- a/features/tester/impl/build.gradle.kts +++ b/features/tester/impl/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.tester.impl" +} + dependencies { /** AndroidX */ implementation(deps.androidx.activity.compose) diff --git a/features/tester/impl/src/main/AndroidManifest.xml b/features/tester/impl/src/main/AndroidManifest.xml index b4e4fc0cfd..b729d8f73c 100644 --- a/features/tester/impl/src/main/AndroidManifest.xml +++ b/features/tester/impl/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - \ No newline at end of file diff --git a/features/wallet/impl/build.gradle.kts b/features/wallet/impl/build.gradle.kts index e2d5cb6d0f..db4d102187 100644 --- a/features/wallet/impl/build.gradle.kts +++ b/features/wallet/impl/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.feature.wallet.impl" +} + dependencies { /** AndroidX */ implementation(deps.androidx.activity.compose) diff --git a/features/wallet/impl/src/main/AndroidManifest.xml b/features/wallet/impl/src/main/AndroidManifest.xml deleted file mode 100644 index a1a96bfa00..0000000000 --- a/features/wallet/impl/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/WalletsList.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/WalletsList.kt index 455cf810c4..bd417d7a27 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/WalletsList.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/WalletsList.kt @@ -22,7 +22,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.tangem.core.ui.res.TangemTheme import com.tangem.feature.wallet.presentation.common.WalletPreviewData @@ -31,8 +30,6 @@ import com.tangem.feature.wallet.presentation.wallet.ui.components.common.Wallet import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toPersistentList -private const val SHORT_SNAP_ELEMENT_COUNT = 50 - /** * Wallets list component * @@ -56,7 +53,7 @@ internal fun WalletsList( state = lazyListState, contentPadding = PaddingValues(horizontal = TangemTheme.dimens.spacing16), horizontalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing8), - flingBehavior = rememberWalletsFlingBehaviour(lazyListState = lazyListState, itemWidth = itemWidth), + flingBehavior = rememberWalletsFlingBehaviour(lazyListState = lazyListState), ) { items( items = wallets, @@ -76,17 +73,14 @@ internal fun WalletsList( /** * Custom implementation of fling behaviour that overrides 'shortSnapVelocityThreshold'. - * Every user's drag action will similar to a short snap - * if drag offset is less than [SHORT_SNAP_ELEMENT_COUNT] * item width. * * @param lazyListState lazy list state - * @param itemWidth list item width * * @see rememberSnapFlingBehavior */ @OptIn(ExperimentalFoundationApi::class) @Composable -private fun rememberWalletsFlingBehaviour(lazyListState: LazyListState, itemWidth: Dp): SnapFlingBehavior { +private fun rememberWalletsFlingBehaviour(lazyListState: LazyListState): SnapFlingBehavior { val snappingLayout = remember(lazyListState) { SnapLayoutInfoProvider(lazyListState) } val density = LocalDensity.current val highVelocityApproachSpec: DecayAnimationSpec = rememberSplineBasedDecay() @@ -97,8 +91,6 @@ private fun rememberWalletsFlingBehaviour(lazyListState: LazyListState, itemWidt lowVelocityAnimationSpec = tween(durationMillis = 1000, easing = LinearEasing), highVelocityAnimationSpec = highVelocityApproachSpec, snapAnimationSpec = spring(stiffness = Spring.StiffnessMediumLow), - density = density, - shortSnapVelocityThreshold = itemWidth * SHORT_SNAP_ELEMENT_COUNT, ) } } diff --git a/gradle.properties b/gradle.properties index 4131a81f9d..7218026460 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,3 +15,4 @@ org.gradle.daemon = true android.useAndroidX = true android.enableJetifier = true org.gradle.unsafe.configuration-cache = true +android.nonTransitiveRClass = false diff --git a/gradle/dependencies.toml b/gradle/dependencies.toml index 56e74e1713..f4b5153615 100644 --- a/gradle/dependencies.toml +++ b/gradle/dependencies.toml @@ -3,10 +3,10 @@ [versions] # region Classpath -androidGradlePlugin = "7.4.2" +androidGradlePlugin = "8.2.2" firebaseCrashlytics = "2.9.4" googleServices = "4.3.10" -kotlin = "1.8.21" +kotlin = "1.9.22" # endregion Classpath # region AndroidX @@ -24,17 +24,17 @@ androidx-datastore = "1.0.0" # endregion AndroidX # region Compose -compose-compiler = "1.4.7" -compose-runtime = "1.5.3" -compose-foundation = "1.5.3" -compose-material = "1.5.3" -compose-material3 = "1.1.2" +compose-compiler = "1.5.9" +compose-runtime = "1.6.1" +compose-foundation = "1.6.1" +compose-material = "1.6.1" +compose-material3 = "1.2.0" compose-constraint = "1.0.1" -compose-navigation = "2.7.4" +compose-navigation = "2.7.7" compose-accompanist = "0.30.1" compose-paging = "3.2.1" compose-reorderable = "0.9.6" -compose-lifecycle-runtime = "2.6.2" +compose-lifecycle-runtime = "2.7.0" # endregion Compose # region Other libraries @@ -50,7 +50,7 @@ googleMaterialComponent = "1.6.1" googlePlayCore = "1.10.3" googlePlayCoreKtx = "1.8.1" googlePlayServicesWallet = "19.1.0" -hilt = "2.44" +hilt = "2.46" hilt-navigation = "1.0.0" jodatime = "2.12.1" kotlin-immutable-collections = "0.3.5" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 135c32a8de..f5e4b2a14c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Mar 07 14:45:01 MSK 2023 -distributionBase = GRADLE_USER_HOME -distributionUrl = https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip -distributionPath = wrapper/dists -zipStorePath = wrapper/dists -zipStoreBase = GRADLE_USER_HOME +#Tue Feb 13 17:04:37 MSK 2024 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/libs/auth/build.gradle.kts b/libs/auth/build.gradle.kts index 1fbece85d5..e1341f668a 100644 --- a/libs/auth/build.gradle.kts +++ b/libs/auth/build.gradle.kts @@ -2,4 +2,8 @@ plugins { alias(deps.plugins.android.library) alias(deps.plugins.kotlin.android) id("configuration") +} + +android { + namespace = "com.tangem.lib.auth" } \ No newline at end of file diff --git a/libs/auth/src/main/AndroidManifest.xml b/libs/auth/src/main/AndroidManifest.xml deleted file mode 100644 index e314bdebe7..0000000000 --- a/libs/auth/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/libs/crypto/build.gradle.kts b/libs/crypto/build.gradle.kts index 917e9c310d..9a8ccaea31 100644 --- a/libs/crypto/build.gradle.kts +++ b/libs/crypto/build.gradle.kts @@ -6,6 +6,10 @@ plugins { id("configuration") } +android { + namespace = "com.tangem.lib.crypto" +} + dependencies { /** Coroutines */ diff --git a/libs/crypto/src/main/AndroidManifest.xml b/libs/crypto/src/main/AndroidManifest.xml deleted file mode 100644 index 1fd7238d41..0000000000 --- a/libs/crypto/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/AppExtensionConfigurations.kt b/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/AppExtensionConfigurations.kt index 05b2b465c2..f288d89a7d 100644 --- a/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/AppExtensionConfigurations.kt +++ b/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/AppExtensionConfigurations.kt @@ -35,6 +35,8 @@ private fun AppExtension.configureDefaultConfig(project: Project) { AppConfig.versionName } + buildFeatures.buildConfig = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } } diff --git a/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/LibraryExtensionConfigurations.kt b/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/LibraryExtensionConfigurations.kt index bc18afa9b9..053151f9f1 100644 --- a/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/LibraryExtensionConfigurations.kt +++ b/plugins/configuration/src/main/kotlin/com/tangem/plugin/configuration/configurations/extension/LibraryExtensionConfigurations.kt @@ -21,6 +21,7 @@ private fun LibraryExtension.configureDefaultConfig() { vectorDrawables { useSupportLibrary = true } + buildFeatures.buildConfig = true } }