Updated on 2026-08-14
This commit is contained in:
parent
894c5664b3
commit
3399ffbcd2
45 changed files with 101 additions and 70 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.tangem.wallet">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.datasource"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
/** Project */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.datasource"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.core.featuretoggles"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
/** DI */
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.core.featuretoggles" />
|
||||
|
|
@ -2,4 +2,8 @@ plugins {
|
|||
alias(deps.plugins.android.library)
|
||||
alias(deps.plugins.kotlin.android)
|
||||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.core.res"
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.core.res" />
|
||||
|
|
@ -4,6 +4,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.core.ui"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** Project - Common */
|
||||
implementation(projects.common)
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.core.ui" />
|
||||
|
|
@ -5,6 +5,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.data.source.preferences"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(deps.androidx.core.ktx)
|
||||
implementation(deps.moshi)
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.data.source.preferences" />
|
||||
|
|
@ -4,6 +4,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.domain.features"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core:datasource"))
|
||||
implementation(project(":core:utils"))
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.domain.features">
|
||||
|
||||
</manifest>
|
||||
|
|
@ -7,6 +7,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.onboarding"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** Core modules */
|
||||
implementation(project(":common"))
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.onboarding" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.referral.data"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
/** Project */
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.referral.data" />
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.referral.domain" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.referral.presentation"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** Core modules */
|
||||
implementation(project(":core:analytics"))
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.referral.presentation" />
|
||||
|
|
@ -7,6 +7,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.swap.api"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** DI */
|
||||
implementation(deps.hilt.android)
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.swap.api" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.swap.data"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
/** AndroidX */
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.swap.data" />
|
||||
|
|
@ -7,6 +7,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.swap.presentation"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** Core modules */
|
||||
implementation(projects.core.analytics)
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.feature.swap.presentation" />
|
||||
|
|
@ -2,4 +2,8 @@ plugins {
|
|||
alias(deps.plugins.android.library)
|
||||
alias(deps.plugins.kotlin.android)
|
||||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.features.tester.api"
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.features.tester.api" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.tester.impl"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** AndroidX */
|
||||
implementation(deps.androidx.activity.compose)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.tangem.feature.tester.impl">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.features.wallet.api"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** AndroidX */
|
||||
implementation(deps.androidx.fragment.ktx)
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.features.wallet.api" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.feature.wallet.impl"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
/** AndroidX */
|
||||
implementation(deps.androidx.activity.compose)
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.tangem.feature.wallet.impl">
|
||||
</manifest>
|
||||
|
|
@ -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<Float> = 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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,3 +15,4 @@ org.gradle.daemon = true
|
|||
android.useAndroidX = true
|
||||
android.enableJetifier = true
|
||||
org.gradle.unsafe.configuration-cache = true
|
||||
android.nonTransitiveRClass = false
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
12
gradle/wrapper/gradle-wrapper.properties
vendored
12
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2,4 +2,8 @@ plugins {
|
|||
alias(deps.plugins.android.library)
|
||||
alias(deps.plugins.kotlin.android)
|
||||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.lib.auth"
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.lib.auth" />
|
||||
|
|
@ -6,6 +6,10 @@ plugins {
|
|||
id("configuration")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.tangem.lib.crypto"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
/** Coroutines */
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.tangem.lib.crypto" />
|
||||
|
|
@ -35,6 +35,8 @@ private fun AppExtension.configureDefaultConfig(project: Project) {
|
|||
AppConfig.versionName
|
||||
}
|
||||
|
||||
buildFeatures.buildConfig = true
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ private fun LibraryExtension.configureDefaultConfig() {
|
|||
vectorDrawables {
|
||||
useSupportLibrary = true
|
||||
}
|
||||
buildFeatures.buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue