diff --git a/build-logic/convention/src/main/kotlin/KotlinMultiplatformLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KotlinMultiplatformLibraryConventionPlugin.kt index 07f93906..588dc189 100644 --- a/build-logic/convention/src/main/kotlin/KotlinMultiplatformLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/KotlinMultiplatformLibraryConventionPlugin.kt @@ -59,16 +59,9 @@ class KotlinMultiplatformLibraryConventionPlugin : Plugin { } } - // extensions.configure { - // namespace = getAndroidNameSpaceFromPath(PACKAGE, path) - // configureKotlinAndroid(this) - // } - extensions.configure { sourceSets.getByName("commonTest").dependencies { implementation(kotlin("test")) - implementation(kotlin("test-annotations-common")) - implementation(kotlin("test-common")) implementation(libs.findLibrary("test.coroutines").get()) implementation(libs.findLibrary("test-turbine").get()) } diff --git a/build.gradle.kts b/build.gradle.kts index 4524223b..06e2e0a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -76,6 +76,7 @@ kover { "*.R", "*.mock", "*.mocks", + "*.generated*" ) annotatedBy("*Generated", "*Composable") } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 38d47fda..4a9652a1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] androidGradlePluginVersion = "9.0.1" -kotlin = "2.3.10" -coroutineVersion = "1.10.2" -kotlinDatetime = "0.7.1-0.6.x-compat" +kotlin = "2.4.0" +coroutineVersion = "1.11.0" +kotlinDatetime = "0.8.0-0.6.x-compat" koin = "4.1.1" koinCompose = "4.1.1" koinCore = "4.1.1" diff --git a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/details/CryptoDetailsViewModelTest.kt b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/details/CryptoDetailsViewModelTest.kt index f01f8ff9..a8f5d185 100644 --- a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/details/CryptoDetailsViewModelTest.kt +++ b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/details/CryptoDetailsViewModelTest.kt @@ -47,13 +47,11 @@ class CryptoDetailsViewModelTest { awaitItem().apply { assertNotNull(cryptoDetails) assertIs(status) - cryptoDetails?.let { - assertEquals("bitcoin", it.base.id) - assertEquals("crypto bitcoin", it.base.name) - assertEquals("CR-BITCOIN", it.base.symbol) - assertEquals("SHA-256", it.hashingAlgorithm) - assertEquals("http://home-bitcoin.com", it.homePageUrl) - } + assertEquals("bitcoin", cryptoDetails.base.id) + assertEquals("crypto bitcoin", cryptoDetails.base.name) + assertEquals("CR-BITCOIN", cryptoDetails.base.symbol) + assertEquals("SHA-256", cryptoDetails.hashingAlgorithm) + assertEquals("http://home-bitcoin.com", cryptoDetails.homePageUrl) } } } diff --git a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/graph/GraphGridGeneratorTest.kt b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/graph/GraphGridGeneratorTest.kt index 8c684a22..bf2c65c0 100644 --- a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/graph/GraphGridGeneratorTest.kt +++ b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/graph/GraphGridGeneratorTest.kt @@ -5,10 +5,10 @@ import dev.ohoussein.cryptoapp.crypto.domain.model.HistoricalPrice import dev.ohoussein.cryptoapp.crypto.domain.model.defaultLocale import dev.ohoussein.cryptoapp.crypto.presentation.fake.FakePriceFormatter import dev.ohoussein.cryptoapp.crypto.presentation.model.GraphInterval -import kotlinx.datetime.Instant import kotlinx.datetime.TimeZone import kotlin.test.Test import kotlin.test.assertEquals +import kotlin.time.Instant class GraphGridGeneratorTest { diff --git a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/list/CryptoListViewModelTest.kt b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/list/CryptoListViewModelTest.kt index a2ccffd0..fd3d5fd0 100644 --- a/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/list/CryptoListViewModelTest.kt +++ b/shared/crypto/presentation/src/commonTest/kotlin/dev/ohoussein/cryptoapp/crypto/presentation/list/CryptoListViewModelTest.kt @@ -46,9 +46,9 @@ class CryptoListViewModelTest { viewModel.state.test { awaitItem().apply { assertNotNull(cryptoList) - assertEquals(5, cryptoList!!.size) + assertEquals(5, cryptoList.size) assertIs(status) - val firstCrypto = cryptoList!!.first() + val firstCrypto = cryptoList.first() assertEquals("70 USD", firstCrypto.price.labelValue.label) assertEquals(70.0, firstCrypto.price.labelValue.value) assertEquals(-2.0, firstCrypto.priceChangePercentIn24h?.value) @@ -77,7 +77,7 @@ class CryptoListViewModelTest { awaitItem().apply { assertIs(status) assertNotNull(cryptoList) - assertEquals(5, cryptoList!!.size) + assertEquals(5, cryptoList.size) } } }