From 5a204c9befb4081aabfdc12791ca70f5513bccff Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 11 Oct 2023 10:16:26 +0200 Subject: [PATCH 01/81] [Oztechan/CCC#2154] Update kover to 0.7.4 (#2155) * [Oztechan/CCC#2154] Update kover to 0.7.4 * [Oztechan/CCC#2154] Update kover to 0.7.4 --- .github/workflows/main.yml | 4 ++-- CCC.gradle.kts | 14 ++++++-------- gradle/libs.versions.toml | 4 ++-- submodule/scopemob | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d25328b9e..781d7dda24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -259,13 +259,13 @@ jobs: - name: Run Quality Jobs uses: gradle/gradle-build-action@v2.9.0 with: - arguments: check koverMergedXmlReport --parallel + arguments: check koverXmlReport --parallel - name: Upload Coverage Report uses: actions/upload-artifact@v3.1.3 with: name: coverageReport - path: build/reports/kover/merged/xml/report.xml + path: build/reports/kover/report.xml - name: Cancel other jobs if this fails if: failure() diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 7a62e54e33..5f1fb44abe 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -34,17 +34,15 @@ version = ProjectSettings.getVersionName(project) allprojects { apply(plugin = rootProject.libs.plugins.kover.get().pluginId).also { - koverMerged { + rootProject.dependencies.add("kover", project(path)) + koverReport { filters { - annotations { - excludes += listOf( - "com.oztechan.ccc.android.ui.compose.annotations.ThemedPreviews", - "androidx.compose.ui.tooling.preview.Preview", - "androidx.compose.runtime.Composable" - ) + excludes { + annotatedBy("com.oztechan.ccc.android.ui.compose.annotations.ThemedPreviews") + annotatedBy("androidx.compose.ui.tooling.preview.Preview") + annotatedBy("androidx.compose.runtime.Composable") } } - enable() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dacbb5dc8a..cb839e928a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,7 +38,7 @@ lifecycle = "2.6.2" mokoResources = "0.23.0" buildKonfig = "0.14.0" splashScreen = "1.0.1" -kover = "0.6.1" +kover = "0.7.4" rootBeer = "0.1.0" mockative = "2.0.1" firebaseCrashlytics = "18.4.3" @@ -127,7 +127,7 @@ classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gr classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } classpaths-mokoResources = { module = "dev.icerock.moko:resources-generator", version.ref = "mokoResources" } classpaths-buildKonfig = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } -classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kover" } +classpaths-kover = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "kover" } [plugins] diff --git a/submodule/scopemob b/submodule/scopemob index 70dc1506b5..a7c42a1770 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 70dc1506b50672e7b8b5c5568752e29a73c70264 +Subproject commit a7c42a1770a58b2755cc6e63906a0ec2fda1c71e From 4bcde2b16185124d887d45e495f20f635304ce75 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Thu, 12 Oct 2023 16:57:46 +0200 Subject: [PATCH 02/81] [Oztechan/CCC#2850] Revert recent Kover update since it removes android targets (#2851) This reverts commit 5a204c9befb4081aabfdc12791ca70f5513bccff. --- .github/workflows/main.yml | 4 ++-- CCC.gradle.kts | 14 ++++++++------ gradle/libs.versions.toml | 4 ++-- submodule/scopemob | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 781d7dda24..2d25328b9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -259,13 +259,13 @@ jobs: - name: Run Quality Jobs uses: gradle/gradle-build-action@v2.9.0 with: - arguments: check koverXmlReport --parallel + arguments: check koverMergedXmlReport --parallel - name: Upload Coverage Report uses: actions/upload-artifact@v3.1.3 with: name: coverageReport - path: build/reports/kover/report.xml + path: build/reports/kover/merged/xml/report.xml - name: Cancel other jobs if this fails if: failure() diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 5f1fb44abe..7a62e54e33 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -34,15 +34,17 @@ version = ProjectSettings.getVersionName(project) allprojects { apply(plugin = rootProject.libs.plugins.kover.get().pluginId).also { - rootProject.dependencies.add("kover", project(path)) - koverReport { + koverMerged { filters { - excludes { - annotatedBy("com.oztechan.ccc.android.ui.compose.annotations.ThemedPreviews") - annotatedBy("androidx.compose.ui.tooling.preview.Preview") - annotatedBy("androidx.compose.runtime.Composable") + annotations { + excludes += listOf( + "com.oztechan.ccc.android.ui.compose.annotations.ThemedPreviews", + "androidx.compose.ui.tooling.preview.Preview", + "androidx.compose.runtime.Composable" + ) } } + enable() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cb839e928a..dacbb5dc8a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,7 +38,7 @@ lifecycle = "2.6.2" mokoResources = "0.23.0" buildKonfig = "0.14.0" splashScreen = "1.0.1" -kover = "0.7.4" +kover = "0.6.1" rootBeer = "0.1.0" mockative = "2.0.1" firebaseCrashlytics = "18.4.3" @@ -127,7 +127,7 @@ classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gr classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } classpaths-mokoResources = { module = "dev.icerock.moko:resources-generator", version.ref = "mokoResources" } classpaths-buildKonfig = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } -classpaths-kover = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "kover" } +classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kover" } [plugins] diff --git a/submodule/scopemob b/submodule/scopemob index a7c42a1770..70dc1506b5 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit a7c42a1770a58b2755cc6e63906a0ec2fda1c71e +Subproject commit 70dc1506b50672e7b8b5c5568752e29a73c70264 From 35fd6167e5dfa0995c7e09e069356e6ec12b0e4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:12:22 +0200 Subject: [PATCH 03/81] [Oztechan/CCC#1457] Dependency update submodule/scopemob digest to a7c42a1 (#2847) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/scopemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/scopemob b/submodule/scopemob index 70dc1506b5..a7c42a1770 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 70dc1506b50672e7b8b5c5568752e29a73c70264 +Subproject commit a7c42a1770a58b2755cc6e63906a0ec2fda1c71e From 14e946bd61103bdd3a14be3a5c77c3714ab01896 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:15:11 +0200 Subject: [PATCH 04/81] [Oztechan/CCC#1457] Dependency update submodule/parsermob digest to d7e5a78 (#2852) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/parsermob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/parsermob b/submodule/parsermob index 558a88a56d..d7e5a78983 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 558a88a56d0fd78946dc62fe8011cf3d68f31fda +Subproject commit d7e5a789832ef4b24e6dccf3efcf7da2c3ad8be5 From 4826e2dc2b74bff29fd2a1d36dd605de842559af Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:35:10 +0200 Subject: [PATCH 05/81] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to 4914a90 (#2858) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 847dfaf57e..4914a90e1c 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 847dfaf57e811e4975c87b2c30ec0ec028303432 +Subproject commit 4914a90e1ce3bc4298a65a77922e5987873b1a6a From f41457a239859116805e074fb8b8a1747c55670e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:35:19 +0200 Subject: [PATCH 06/81] [Oztechan/CCC#1457] Dependency update kermit to v2.0.2 (#2853) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dacbb5dc8a..0a7cd566d7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -43,7 +43,7 @@ rootBeer = "0.1.0" mockative = "2.0.1" firebaseCrashlytics = "18.4.3" anrWatchDog = "1.4.0" -kermit = "2.0.1" +kermit = "2.0.2" [libraries] # COMMON From 9b529096e428b7695e5e80bb97374598add8eecc Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 14 Oct 2023 12:36:16 +0200 Subject: [PATCH 07/81] [Oztechan/CCC#2855] Add Flow support for multiplatform settings (#2856) * [Oztechan/CCC#2855] Add Flow support for multiplatform settings * [Oztechan/CCC#2855] Add Flow support for multiplatform settings * [Oztechan/CCC#2855] Add Flow support for multiplatform settings --- .../client-core-persistence.gradle.kts | 3 +++ .../di/ClientCorePersistenceModule.android.kt | 7 +++++- .../core/persistence/FlowPersistence.kt | 7 ++++++ .../core/persistence/FlowPersistenceImpl.kt | 23 +++++++++++++++++++ .../core/persistence/PersistenceImpl.kt | 1 + .../core/persistence/PersistenceTest.kt | 4 +++- .../di/ClientCorePersistenceModule.ios.kt | 7 +++++- gradle/libs.versions.toml | 1 + 8 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistence.kt create mode 100644 client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt diff --git a/client/core/persistence/client-core-persistence.gradle.kts b/client/core/persistence/client-core-persistence.gradle.kts index 1e6b6411eb..88abf04d5f 100644 --- a/client/core/persistence/client-core-persistence.gradle.kts +++ b/client/core/persistence/client-core-persistence.gradle.kts @@ -21,7 +21,9 @@ kotlin { dependencies { libs.common.apply { implementation(koinCore) + implementation(coroutines) implementation(multiplatformSettings) + implementation(multiplatformSettingsCoroutines) } } } @@ -30,6 +32,7 @@ kotlin { libs.common.apply { implementation(test) implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt index 784241f725..5556664536 100644 --- a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt +++ b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt @@ -2,8 +2,11 @@ package com.oztechan.ccc.client.core.persistence.di import android.content.Context import android.content.SharedPreferences +import com.oztechan.ccc.client.core.persistence.FlowPersistence +import com.oztechan.ccc.client.core.persistence.FlowPersistenceImpl import com.oztechan.ccc.client.core.persistence.Persistence import com.oztechan.ccc.client.core.persistence.PersistenceImpl +import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.Settings import com.russhwolf.settings.SharedPreferencesSettings import org.koin.core.module.dsl.bind @@ -14,8 +17,10 @@ private const val KEY_APPLICATION_PREFERENCES = "application_preferences" actual val clientCorePersistenceModule = module { singleOf(::provideSharedPreferences) - single { SharedPreferencesSettings(get()) } + single { SharedPreferencesSettings(get()) } + single { get() } singleOf(::PersistenceImpl) { bind() } + singleOf(::FlowPersistenceImpl) { bind() } } private fun provideSharedPreferences( diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistence.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistence.kt new file mode 100644 index 0000000000..78830b67b1 --- /dev/null +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistence.kt @@ -0,0 +1,7 @@ +package com.oztechan.ccc.client.core.persistence + +import kotlinx.coroutines.flow.Flow + +interface FlowPersistence { + fun getFlow(key: String, defaultValue: T): Flow +} diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt new file mode 100644 index 0000000000..13f549071a --- /dev/null +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt @@ -0,0 +1,23 @@ +package com.oztechan.ccc.client.core.persistence + +import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException +import com.russhwolf.settings.ObservableSettings +import com.russhwolf.settings.coroutines.getBooleanFlow +import com.russhwolf.settings.coroutines.getFloatFlow +import com.russhwolf.settings.coroutines.getIntFlow +import com.russhwolf.settings.coroutines.getLongFlow +import com.russhwolf.settings.coroutines.getStringFlow +import kotlinx.coroutines.flow.Flow + +class FlowPersistenceImpl(private val observableSettings: ObservableSettings) : FlowPersistence { + @Suppress("UNCHECKED_CAST", "OPT_IN_USAGE") + override fun getFlow(key: String, defaultValue: T): Flow = + when (defaultValue) { + is Long -> observableSettings.getLongFlow(key, defaultValue) as Flow + is String -> observableSettings.getStringFlow(key, defaultValue) as Flow + is Int -> observableSettings.getIntFlow(key, defaultValue) as Flow + is Boolean -> observableSettings.getBooleanFlow(key, defaultValue) as Flow + is Float -> observableSettings.getFloatFlow(key, defaultValue) as Flow + else -> throw UnsupportedPersistenceException() + } +} diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceImpl.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceImpl.kt index a2747caf61..f5f6216942 100644 --- a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceImpl.kt +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceImpl.kt @@ -4,6 +4,7 @@ import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceExce import com.russhwolf.settings.Settings internal class PersistenceImpl(private val settings: Settings) : Persistence { + @Suppress("UNCHECKED_CAST") override fun getValue(key: String, defaultValue: T): T = when (defaultValue) { is Long -> settings.getLong(key, defaultValue) as T diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt index cacd3beb0b..5c0d5978c3 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt @@ -19,7 +19,9 @@ internal class PersistenceTest { } @Mock - private val settings = configure(mock(classOf())) { stubsUnitByDefault = true } + private val settings = configure(mock(classOf())) { + stubsUnitByDefault = true + } private val key = "key" diff --git a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt index 1e01c68c4a..bcbf6c12b8 100644 --- a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt +++ b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt @@ -1,16 +1,21 @@ package com.oztechan.ccc.client.core.persistence.di +import com.oztechan.ccc.client.core.persistence.FlowPersistence +import com.oztechan.ccc.client.core.persistence.FlowPersistenceImpl import com.oztechan.ccc.client.core.persistence.Persistence import com.oztechan.ccc.client.core.persistence.PersistenceImpl import com.russhwolf.settings.NSUserDefaultsSettings +import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.Settings import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.singleOf import org.koin.dsl.module actual val clientCorePersistenceModule = module { - single { + single { NSUserDefaultsSettings(get().userDefaults) } + single { get() } singleOf(::PersistenceImpl) { bind() } + singleOf(::FlowPersistenceImpl) { bind() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0a7cd566d7..fbf52eb4cb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -51,6 +51,7 @@ common-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotl common-testAnnotations = { module = "org.jetbrains.kotlin:kotlin-test-annotations-common", version.ref = "kotlin" } common-koinCore = { module = "io.insert-koin:koin-core", version.ref = "koinCore" } common-multiplatformSettings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatformSettings" } +common-multiplatformSettingsCoroutines = { module = "com.russhwolf:multiplatform-settings-coroutines", version.ref = "multiplatformSettings" } common-kotlinXDateTime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinXDateTime" } common-ktorLogging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } common-ktorJson = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } From 5eaa8b15234db442f364e91cd952a8cb6beae688 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 14 Oct 2023 13:19:24 +0200 Subject: [PATCH 08/81] [Oztechan/CCC#2857] Add Suspension support for multiplatform settings (#2859) --- .../di/ClientCorePersistenceModule.android.kt | 10 +++++++ .../core/persistence/SuspendPersistence.kt | 6 ++++ .../persistence/SuspendPersistenceImpl.kt | 28 +++++++++++++++++++ .../di/ClientCorePersistenceModule.ios.kt | 9 ++++++ submodule/logmob | 2 +- 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistence.kt create mode 100644 client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceImpl.kt diff --git a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt index 5556664536..8b4874caa3 100644 --- a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt +++ b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt @@ -6,9 +6,13 @@ import com.oztechan.ccc.client.core.persistence.FlowPersistence import com.oztechan.ccc.client.core.persistence.FlowPersistenceImpl import com.oztechan.ccc.client.core.persistence.Persistence import com.oztechan.ccc.client.core.persistence.PersistenceImpl +import com.oztechan.ccc.client.core.persistence.SuspendPersistence +import com.oztechan.ccc.client.core.persistence.SuspendPersistenceImpl import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.Settings import com.russhwolf.settings.SharedPreferencesSettings +import com.russhwolf.settings.coroutines.SuspendSettings +import com.russhwolf.settings.coroutines.toSuspendSettings import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.singleOf import org.koin.dsl.module @@ -17,10 +21,16 @@ private const val KEY_APPLICATION_PREFERENCES = "application_preferences" actual val clientCorePersistenceModule = module { singleOf(::provideSharedPreferences) + single { SharedPreferencesSettings(get()) } single { get() } + @Suppress("OPT_IN_USAGE") + single { get().toSuspendSettings() } + singleOf(::PersistenceImpl) { bind() } singleOf(::FlowPersistenceImpl) { bind() } + @Suppress("OPT_IN_USAGE") + singleOf(::SuspendPersistenceImpl) { bind() } } private fun provideSharedPreferences( diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistence.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistence.kt new file mode 100644 index 0000000000..bb4e617c04 --- /dev/null +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistence.kt @@ -0,0 +1,6 @@ +package com.oztechan.ccc.client.core.persistence + +interface SuspendPersistence { + suspend fun getSuspend(key: String, defaultValue: T): T + suspend fun setSuspend(key: String, value: T) +} diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceImpl.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceImpl.kt new file mode 100644 index 0000000000..80cda13286 --- /dev/null +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceImpl.kt @@ -0,0 +1,28 @@ +package com.oztechan.ccc.client.core.persistence + +import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException +import com.russhwolf.settings.coroutines.SuspendSettings + +@Suppress("OPT_IN_USAGE") +class SuspendPersistenceImpl(private val suspendSettings: SuspendSettings) : SuspendPersistence { + + @Suppress("UNCHECKED_CAST") + override suspend fun getSuspend(key: String, defaultValue: T): T = + when (defaultValue) { + is Long -> suspendSettings.getLong(key, defaultValue) as T + is String -> suspendSettings.getString(key, defaultValue) as T + is Int -> suspendSettings.getInt(key, defaultValue) as T + is Boolean -> suspendSettings.getBoolean(key, defaultValue) as T + is Float -> suspendSettings.getFloat(key, defaultValue) as T + else -> throw UnsupportedPersistenceException() + } + + override suspend fun setSuspend(key: String, value: T) = when (value) { + is Long -> suspendSettings.putLong(key, value) + is String -> suspendSettings.putString(key, value) + is Int -> suspendSettings.putInt(key, value) + is Boolean -> suspendSettings.putBoolean(key, value) + is Float -> suspendSettings.putFloat(key, value) + else -> throw UnsupportedPersistenceException() + } +} diff --git a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt index bcbf6c12b8..0840bfcf3f 100644 --- a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt +++ b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt @@ -4,9 +4,13 @@ import com.oztechan.ccc.client.core.persistence.FlowPersistence import com.oztechan.ccc.client.core.persistence.FlowPersistenceImpl import com.oztechan.ccc.client.core.persistence.Persistence import com.oztechan.ccc.client.core.persistence.PersistenceImpl +import com.oztechan.ccc.client.core.persistence.SuspendPersistence +import com.oztechan.ccc.client.core.persistence.SuspendPersistenceImpl import com.russhwolf.settings.NSUserDefaultsSettings import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.Settings +import com.russhwolf.settings.coroutines.SuspendSettings +import com.russhwolf.settings.coroutines.toSuspendSettings import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.singleOf import org.koin.dsl.module @@ -16,6 +20,11 @@ actual val clientCorePersistenceModule = module { NSUserDefaultsSettings(get().userDefaults) } single { get() } + @Suppress("OPT_IN_USAGE") + single { get().toSuspendSettings() } + singleOf(::PersistenceImpl) { bind() } singleOf(::FlowPersistenceImpl) { bind() } + @Suppress("OPT_IN_USAGE") + singleOf(::SuspendPersistenceImpl) { bind() } } diff --git a/submodule/logmob b/submodule/logmob index 4914a90e1c..847dfaf57e 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 4914a90e1ce3bc4298a65a77922e5987873b1a6a +Subproject commit 847dfaf57e811e4975c87b2c30ec0ec028303432 From 00c0fe0e19e62bc4dd84225508d6453431cf4ddc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 13:20:32 +0200 Subject: [PATCH 09/81] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to 4914a90 (#2862) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 847dfaf57e..4914a90e1c 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 847dfaf57e811e4975c87b2c30ec0ec028303432 +Subproject commit 4914a90e1ce3bc4298a65a77922e5987873b1a6a From d34d14d2aead5a3b115a9715ec21f82d23b48021 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 15 Oct 2023 12:07:58 +0200 Subject: [PATCH 10/81] [Oztechan/CCC#2860] Move common test values to Fakes in order to share (#2861) --- .../core/persistence/PersistenceTest.kt | 69 +++++++++---------- .../client/core/persistence/fakes/Fakes.kt | 12 ++++ 2 files changed, 45 insertions(+), 36 deletions(-) create mode 100644 client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/fakes/Fakes.kt diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt index 5c0d5978c3..ff330ef5e2 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt @@ -1,6 +1,12 @@ package com.oztechan.ccc.client.core.persistence import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.KEY +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockBoolean +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockFloat +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockInt +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockLong +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockString import com.russhwolf.settings.Settings import io.mockative.Mock import io.mockative.classOf @@ -8,7 +14,6 @@ import io.mockative.configure import io.mockative.every import io.mockative.mock import io.mockative.verify -import kotlin.random.Random import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -23,62 +28,54 @@ internal class PersistenceTest { stubsUnitByDefault = true } - private val key = "key" - - private val mockFloat = Random.nextFloat() - private val mockBoolean = Random.nextBoolean() - private val mockInt = Random.nextInt() - private val mockString = Random.nextInt().toString() - private val mockLong = Random.nextLong() - @Test fun `getValue returns the same type`() { - every { settings.getFloat(key, mockFloat) } + every { settings.getFloat(KEY, mockFloat) } .returns(mockFloat) - every { settings.getBoolean(key, mockBoolean) } + every { settings.getBoolean(KEY, mockBoolean) } .returns(mockBoolean) - every { settings.getInt(key, mockInt) } + every { settings.getInt(KEY, mockInt) } .returns(mockInt) - every { settings.getString(key, mockString) } + every { settings.getString(KEY, mockString) } .returns(mockString) - every { settings.getLong(key, mockLong) } + every { settings.getLong(KEY, mockLong) } .returns(mockLong) - assertEquals(mockFloat, persistence.getValue(key, mockFloat)) - assertEquals(mockBoolean, persistence.getValue(key, mockBoolean)) - assertEquals(mockInt, persistence.getValue(key, mockInt)) - assertEquals(mockString, persistence.getValue(key, mockString)) - assertEquals(mockLong, persistence.getValue(key, mockLong)) + assertEquals(mockFloat, persistence.getValue(KEY, mockFloat)) + assertEquals(mockBoolean, persistence.getValue(KEY, mockBoolean)) + assertEquals(mockInt, persistence.getValue(KEY, mockInt)) + assertEquals(mockString, persistence.getValue(KEY, mockString)) + assertEquals(mockLong, persistence.getValue(KEY, mockLong)) - verify { settings.getFloat(key, mockFloat) } + verify { settings.getFloat(KEY, mockFloat) } .wasInvoked() - verify { settings.getBoolean(key, mockBoolean) } + verify { settings.getBoolean(KEY, mockBoolean) } .wasInvoked() - verify { settings.getInt(key, mockInt) } + verify { settings.getInt(KEY, mockInt) } .wasInvoked() - verify { settings.getString(key, mockString) } + verify { settings.getString(KEY, mockString) } .wasInvoked() - verify { settings.getLong(key, mockLong) } + verify { settings.getLong(KEY, mockLong) } .wasInvoked() } @Test fun `setValue sets the same type`() { - persistence.setValue(key, mockFloat) - persistence.setValue(key, mockBoolean) - persistence.setValue(key, mockInt) - persistence.setValue(key, mockString) - persistence.setValue(key, mockLong) + persistence.setValue(KEY, mockFloat) + persistence.setValue(KEY, mockBoolean) + persistence.setValue(KEY, mockInt) + persistence.setValue(KEY, mockString) + persistence.setValue(KEY, mockLong) - verify { settings.putFloat(key, mockFloat) } + verify { settings.putFloat(KEY, mockFloat) } .wasInvoked() - verify { settings.putBoolean(key, mockBoolean) } + verify { settings.putBoolean(KEY, mockBoolean) } .wasInvoked() - verify { settings.putInt(key, mockInt) } + verify { settings.putInt(KEY, mockInt) } .wasInvoked() - verify { settings.putString(key, mockString) } + verify { settings.putString(KEY, mockString) } .wasInvoked() - verify { settings.putLong(key, mockLong) } + verify { settings.putLong(KEY, mockLong) } .wasInvoked() } @@ -87,10 +84,10 @@ internal class PersistenceTest { val mockObject = object {} assertFailsWith(UnsupportedPersistenceException::class) { - persistence.setValue(key, mockObject) + persistence.setValue(KEY, mockObject) } assertFailsWith(UnsupportedPersistenceException::class) { - persistence.getValue(key, mockObject) + persistence.getValue(KEY, mockObject) } } } diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/fakes/Fakes.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/fakes/Fakes.kt new file mode 100644 index 0000000000..dec0075d52 --- /dev/null +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/fakes/Fakes.kt @@ -0,0 +1,12 @@ +package com.oztechan.ccc.client.core.persistence.fakes + +import kotlin.random.Random + +object Fakes { + const val KEY = "key" + val mockFloat = Random.nextFloat() + val mockBoolean = Random.nextBoolean() + val mockInt = Random.nextInt() + val mockString = Random.nextInt().toString() + val mockLong = Random.nextLong() +} From 00696db754c0ac4e739a04fe6707c4372b6f03cf Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 15 Oct 2023 14:41:19 +0200 Subject: [PATCH 11/81] [Oztechan/CCC#2863] Use relevant settings for persistencs (#2864) --- .../di/ClientCorePersistenceModule.android.kt | 5 +++++ .../core/persistence/FlowPersistenceImpl.kt | 22 ++++++++----------- .../di/ClientCorePersistenceModule.ios.kt | 7 ++++-- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt index 8b4874caa3..8267a5748c 100644 --- a/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt +++ b/client/core/persistence/src/androidMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.android.kt @@ -11,7 +11,9 @@ import com.oztechan.ccc.client.core.persistence.SuspendPersistenceImpl import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.Settings import com.russhwolf.settings.SharedPreferencesSettings +import com.russhwolf.settings.coroutines.FlowSettings import com.russhwolf.settings.coroutines.SuspendSettings +import com.russhwolf.settings.coroutines.toFlowSettings import com.russhwolf.settings.coroutines.toSuspendSettings import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.singleOf @@ -26,8 +28,11 @@ actual val clientCorePersistenceModule = module { single { get() } @Suppress("OPT_IN_USAGE") single { get().toSuspendSettings() } + @Suppress("OPT_IN_USAGE") + single { get().toFlowSettings() } singleOf(::PersistenceImpl) { bind() } + @Suppress("OPT_IN_USAGE") singleOf(::FlowPersistenceImpl) { bind() } @Suppress("OPT_IN_USAGE") singleOf(::SuspendPersistenceImpl) { bind() } diff --git a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt index 13f549071a..4ad3115c03 100644 --- a/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt +++ b/client/core/persistence/src/commonMain/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceImpl.kt @@ -1,23 +1,19 @@ package com.oztechan.ccc.client.core.persistence import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException -import com.russhwolf.settings.ObservableSettings -import com.russhwolf.settings.coroutines.getBooleanFlow -import com.russhwolf.settings.coroutines.getFloatFlow -import com.russhwolf.settings.coroutines.getIntFlow -import com.russhwolf.settings.coroutines.getLongFlow -import com.russhwolf.settings.coroutines.getStringFlow +import com.russhwolf.settings.coroutines.FlowSettings import kotlinx.coroutines.flow.Flow -class FlowPersistenceImpl(private val observableSettings: ObservableSettings) : FlowPersistence { - @Suppress("UNCHECKED_CAST", "OPT_IN_USAGE") +@Suppress("OPT_IN_USAGE") +class FlowPersistenceImpl(private val flowSettings: FlowSettings) : FlowPersistence { + @Suppress("UNCHECKED_CAST") override fun getFlow(key: String, defaultValue: T): Flow = when (defaultValue) { - is Long -> observableSettings.getLongFlow(key, defaultValue) as Flow - is String -> observableSettings.getStringFlow(key, defaultValue) as Flow - is Int -> observableSettings.getIntFlow(key, defaultValue) as Flow - is Boolean -> observableSettings.getBooleanFlow(key, defaultValue) as Flow - is Float -> observableSettings.getFloatFlow(key, defaultValue) as Flow + is Long -> flowSettings.getLongFlow(key, defaultValue) as Flow + is String -> flowSettings.getStringFlow(key, defaultValue) as Flow + is Int -> flowSettings.getIntFlow(key, defaultValue) as Flow + is Boolean -> flowSettings.getBooleanFlow(key, defaultValue) as Flow + is Float -> flowSettings.getFloatFlow(key, defaultValue) as Flow else -> throw UnsupportedPersistenceException() } } diff --git a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt index 0840bfcf3f..3150a65c87 100644 --- a/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt +++ b/client/core/persistence/src/iosMain/kotlin/com/oztechan/ccc/client/core/persistence/di/ClientCorePersistenceModule.ios.kt @@ -8,8 +8,9 @@ import com.oztechan.ccc.client.core.persistence.SuspendPersistence import com.oztechan.ccc.client.core.persistence.SuspendPersistenceImpl import com.russhwolf.settings.NSUserDefaultsSettings import com.russhwolf.settings.ObservableSettings -import com.russhwolf.settings.Settings +import com.russhwolf.settings.coroutines.FlowSettings import com.russhwolf.settings.coroutines.SuspendSettings +import com.russhwolf.settings.coroutines.toFlowSettings import com.russhwolf.settings.coroutines.toSuspendSettings import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.singleOf @@ -19,11 +20,13 @@ actual val clientCorePersistenceModule = module { single { NSUserDefaultsSettings(get().userDefaults) } - single { get() } @Suppress("OPT_IN_USAGE") single { get().toSuspendSettings() } + @Suppress("OPT_IN_USAGE") + single { get().toFlowSettings() } singleOf(::PersistenceImpl) { bind() } + @Suppress("OPT_IN_USAGE") singleOf(::FlowPersistenceImpl) { bind() } @Suppress("OPT_IN_USAGE") singleOf(::SuspendPersistenceImpl) { bind() } From ef9f1877746c949f279fce027d48ab657136d728 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 15 Oct 2023 15:37:45 +0200 Subject: [PATCH 12/81] [Oztechan/CCC#2869] Opt-in for ExperimentalSettingsApi (#2870) * [Oztechan/CCC#2869] Opt-in for ExperimentalSettingsApi * [Oztechan/CCC#2869] Opt-in for ExperimentalSettingsApi * [Oztechan/CCC#2869] Opt-in for ExperimentalSettingsApi --- .../core/persistence/client-core-persistence.gradle.kts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/core/persistence/client-core-persistence.gradle.kts b/client/core/persistence/client-core-persistence.gradle.kts index 88abf04d5f..4ce6075803 100644 --- a/client/core/persistence/client-core-persistence.gradle.kts +++ b/client/core/persistence/client-core-persistence.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { libs.plugins.apply { id(multiplatform.get().pluginId) @@ -38,6 +40,12 @@ kotlin { } } } +// todo remove after https://github.com/russhwolf/multiplatform-settings/issues/119 +tasks.withType { + kotlinOptions { + freeCompilerArgs += "-opt-in=com.russhwolf.settings.ExperimentalSettingsApi" + } +} dependencies { configurations From fdc952c58894b84d3b32e3bd50bb29e2fede40f0 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 15 Oct 2023 17:18:17 +0200 Subject: [PATCH 13/81] [Oztechan/CCC#2865] Create test for SuspendPersistence (#2866) --- .../persistence/SuspendPersistenceTest.kt | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt new file mode 100644 index 0000000000..325886123a --- /dev/null +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt @@ -0,0 +1,96 @@ +package com.oztechan.ccc.client.core.persistence + +import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.KEY +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockBoolean +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockFloat +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockInt +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockLong +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockString +import com.russhwolf.settings.coroutines.SuspendSettings +import io.mockative.Mock +import io.mockative.classOf +import io.mockative.coEvery +import io.mockative.coVerify +import io.mockative.configure +import io.mockative.mock +import kotlinx.coroutines.test.runTest +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith + +@Suppress("OPT_IN_USAGE") +internal class SuspendPersistenceTest { + private val suspendPersistence: SuspendPersistence by lazy { + SuspendPersistenceImpl(suspendSettings) + } + + @Mock + private val suspendSettings = configure(mock(classOf())) { + stubsUnitByDefault = true + } + + @Test + fun `getSuspend returns the same type`() = runTest { + coEvery { suspendSettings.getFloat(KEY, mockFloat) } + .returns(mockFloat) + coEvery { suspendSettings.getBoolean(KEY, mockBoolean) } + .returns(mockBoolean) + coEvery { suspendSettings.getInt(KEY, mockInt) } + .returns(mockInt) + coEvery { suspendSettings.getString(KEY, mockString) } + .returns(mockString) + coEvery { suspendSettings.getLong(KEY, mockLong) } + .returns(mockLong) + + assertEquals(mockFloat, suspendPersistence.getSuspend(KEY, mockFloat)) + assertEquals(mockBoolean, suspendPersistence.getSuspend(KEY, mockBoolean)) + assertEquals(mockInt, suspendPersistence.getSuspend(KEY, mockInt)) + assertEquals(mockString, suspendPersistence.getSuspend(KEY, mockString)) + assertEquals(mockLong, suspendPersistence.getSuspend(KEY, mockLong)) + + coVerify { suspendSettings.getFloat(KEY, mockFloat) } + .wasInvoked() + coVerify { suspendSettings.getBoolean(KEY, mockBoolean) } + .wasInvoked() + coVerify { suspendSettings.getInt(KEY, mockInt) } + .wasInvoked() + coVerify { suspendSettings.getString(KEY, mockString) } + .wasInvoked() + coVerify { suspendSettings.getLong(KEY, mockLong) } + .wasInvoked() + } + + @Test + fun `setSuspend sets the same type`() = runTest { + suspendPersistence.setSuspend(KEY, mockFloat) + suspendPersistence.setSuspend(KEY, mockBoolean) + suspendPersistence.setSuspend(KEY, mockInt) + suspendPersistence.setSuspend(KEY, mockString) + suspendPersistence.setSuspend(KEY, mockLong) + + coVerify { suspendSettings.putFloat(KEY, mockFloat) } + .wasInvoked() + coVerify { suspendSettings.putBoolean(KEY, mockBoolean) } + .wasInvoked() + coVerify { suspendSettings.putInt(KEY, mockInt) } + .wasInvoked() + coVerify { suspendSettings.putString(KEY, mockString) } + .wasInvoked() + coVerify { suspendSettings.putLong(KEY, mockLong) } + .wasInvoked() + } + + @Test + fun `setSuspend throw UnsupportedPersistenceException when unsupported type tried to saved or read`() = + runTest { + val mockObject = object {} + + assertFailsWith(UnsupportedPersistenceException::class) { + suspendPersistence.setSuspend(KEY, mockObject) + } + assertFailsWith(UnsupportedPersistenceException::class) { + suspendPersistence.getSuspend(KEY, mockObject) + } + } +} From 47ea4f95d22c662ef5c83acf1a9ffa8a0d20249a Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 15 Oct 2023 17:18:31 +0200 Subject: [PATCH 14/81] [Oztechan/CCC#2867] Create test for FlowPersistence (#2868) --- .../core/persistence/FlowPersistenceTest.kt | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt new file mode 100644 index 0000000000..4676fc803b --- /dev/null +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt @@ -0,0 +1,63 @@ +package com.oztechan.ccc.client.core.persistence + +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.KEY +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockBoolean +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockFloat +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockInt +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockLong +import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockString +import com.russhwolf.settings.coroutines.FlowSettings +import io.mockative.Mock +import io.mockative.classOf +import io.mockative.configure +import io.mockative.every +import io.mockative.mock +import io.mockative.verify +import kotlinx.coroutines.flow.firstOrNull +import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.test.runTest +import kotlin.test.Test +import kotlin.test.assertEquals + +@Suppress("OPT_IN_USAGE") +class FlowPersistenceTest { + private val flowPersistence: FlowPersistence by lazy { + FlowPersistenceImpl(flowSettings) + } + + @Mock + private val flowSettings = configure(mock(classOf())) { + stubsUnitByDefault = true + } + + @Test + fun `getFlow returns the same type`() = runTest { + every { flowSettings.getFloatFlow(KEY, mockFloat) } + .returns(flowOf(mockFloat)) + every { flowSettings.getBooleanFlow(KEY, mockBoolean) } + .returns(flowOf(mockBoolean)) + every { flowSettings.getIntFlow(KEY, mockInt) } + .returns(flowOf(mockInt)) + every { flowSettings.getStringFlow(KEY, mockString) } + .returns(flowOf(mockString)) + every { flowSettings.getLongFlow(KEY, mockLong) } + .returns(flowOf(mockLong)) + + assertEquals(mockFloat, flowPersistence.getFlow(KEY, mockFloat).firstOrNull()) + assertEquals(mockBoolean, flowPersistence.getFlow(KEY, mockBoolean).firstOrNull()) + assertEquals(mockInt, flowPersistence.getFlow(KEY, mockInt).firstOrNull()) + assertEquals(mockString, flowPersistence.getFlow(KEY, mockString).firstOrNull()) + assertEquals(mockLong, flowPersistence.getFlow(KEY, mockLong).firstOrNull()) + + verify { flowSettings.getFloatFlow(KEY, mockFloat) } + .wasInvoked() + verify { flowSettings.getBooleanFlow(KEY, mockBoolean) } + .wasInvoked() + verify { flowSettings.getIntFlow(KEY, mockInt) } + .wasInvoked() + verify { flowSettings.getStringFlow(KEY, mockString) } + .wasInvoked() + verify { flowSettings.getLongFlow(KEY, mockLong) } + .wasInvoked() + } +} From c1f8711b3f2bd36edb6574aebf8c315a63c6b4fc Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Mon, 16 Oct 2023 09:09:59 +0200 Subject: [PATCH 15/81] [Oztechan/CCC#2871] Add error test case for FlowPersistence (#2872) --- .../client/core/persistence/FlowPersistenceTest.kt | 12 ++++++++++++ .../ccc/client/core/persistence/PersistenceTest.kt | 2 +- .../core/persistence/SuspendPersistenceTest.kt | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt index 4676fc803b..8d9cb82159 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt @@ -1,5 +1,6 @@ package com.oztechan.ccc.client.core.persistence +import com.oztechan.ccc.client.core.persistence.error.UnsupportedPersistenceException import com.oztechan.ccc.client.core.persistence.fakes.Fakes.KEY import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockBoolean import com.oztechan.ccc.client.core.persistence.fakes.Fakes.mockFloat @@ -18,6 +19,7 @@ import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertEquals +import kotlin.test.assertFailsWith @Suppress("OPT_IN_USAGE") class FlowPersistenceTest { @@ -60,4 +62,14 @@ class FlowPersistenceTest { verify { flowSettings.getLongFlow(KEY, mockLong) } .wasInvoked() } + + @Test + fun `UnsupportedPersistenceException throw when unsupported type tried to read`() = + runTest { + val mockObject = object {} + + assertFailsWith(UnsupportedPersistenceException::class) { + flowPersistence.getFlow(KEY, mockObject) + } + } } diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt index ff330ef5e2..0c7ca6ec93 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/PersistenceTest.kt @@ -80,7 +80,7 @@ internal class PersistenceTest { } @Test - fun `setValue throw UnsupportedPersistenceException when unsupported type tried to saved or read`() { + fun `UnsupportedPersistenceException throw when unsupported type tried to saved or read`() { val mockObject = object {} assertFailsWith(UnsupportedPersistenceException::class) { diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt index 325886123a..6cc32d4b29 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/SuspendPersistenceTest.kt @@ -82,7 +82,7 @@ internal class SuspendPersistenceTest { } @Test - fun `setSuspend throw UnsupportedPersistenceException when unsupported type tried to saved or read`() = + fun `UnsupportedPersistenceException throw when unsupported type tried to saved or read`() = runTest { val mockObject = object {} From ce6b43016acd361e2f3721654a2edc086bdf1461 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:05:26 +0200 Subject: [PATCH 16/81] [Oztechan/CCC#1457] Lock file maintenance (#2873) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 52a4659d18..0265e8ed2d 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,7 +8,7 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.834.0) + aws-partitions (1.835.0) aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -109,7 +109,7 @@ GEM fastlane-plugin-firebase_app_distribution (0.7.4) google-apis-firebaseappdistribution_v1 (~> 0.3.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.50.0) + google-apis-androidpublisher_v3 (0.51.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.1) addressable (~> 2.5, >= 2.5.1) From 2d5bffaf9b5fcba4937c5445b836e50218f83dec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:26:17 +0200 Subject: [PATCH 17/81] [Oztechan/CCC#1457] Dependency update Git Submodules (#2877) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodule/basemob b/submodule/basemob index 6c6fae76e7..7c8b746c63 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 6c6fae76e75478478a14d0b9ac60743807a47dd3 +Subproject commit 7c8b746c63e7e236ea2073412022f38d7925dd77 diff --git a/submodule/logmob b/submodule/logmob index 4914a90e1c..b20c0d2dbe 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 4914a90e1ce3bc4298a65a77922e5987873b1a6a +Subproject commit b20c0d2dbea2429bf3ee92a6b5208e09fd35c48b diff --git a/submodule/parsermob b/submodule/parsermob index d7e5a78983..144d73ddf0 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit d7e5a789832ef4b24e6dccf3efcf7da2c3ad8be5 +Subproject commit 144d73ddf0ba3f7b2b7cebcf36919869e30ffbdf diff --git a/submodule/scopemob b/submodule/scopemob index a7c42a1770..bf53c7402b 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit a7c42a1770a58b2755cc6e63906a0ec2fda1c71e +Subproject commit bf53c7402b35ca5969b70cd341641e898a682ad0 From d34059dbe92a6952443ba8db92aee84fbaf999a1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:37:56 +0200 Subject: [PATCH 18/81] [Oztechan/CCC#1457] Dependency update actions/checkout action to v4.1.1 (#2876) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- .github/workflows/main.yml | 14 +++++++------- .github/workflows/release.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d25328b9e..6360132710 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,7 +65,7 @@ jobs: steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' fetch-depth: 0 @@ -120,7 +120,7 @@ jobs: steps: - name: Clone Repo # Needed for reading commit message for Firebase App Distribution - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 - name: Download Android Artifacts uses: actions/download-artifact@v3.0.2 @@ -159,7 +159,7 @@ jobs: steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' fetch-depth: 0 @@ -218,7 +218,7 @@ jobs: status: ${{ steps.status.outputs.status }} steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 - name: Download iOS IPA uses: actions/download-artifact@v3.0.2 @@ -246,7 +246,7 @@ jobs: steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' @@ -282,7 +282,7 @@ jobs: status: ${{ steps.status.outputs.status }} steps: - name: Clone Repo # Codecov requires it - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 - name: Download Coverage Report uses: actions/download-artifact@v3.0.2 @@ -329,7 +329,7 @@ jobs: steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fc8c1642e..0fa037f8e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' fetch-depth: 0 @@ -214,7 +214,7 @@ jobs: status: ${{ steps.status.outputs.status }} steps: - name: Clone Repo - uses: actions/checkout@v4.1.0 + uses: actions/checkout@v4.1.1 with: submodules: 'recursive' fetch-depth: 0 From f61c796710e81494808fc0e3f5b540851af13e08 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 21 Oct 2023 11:13:53 +0200 Subject: [PATCH 19/81] [Oztechan/CCC#2885] Create test module (#2887) * [Oztechan/CCC#2885] Create test module (cherry picked from commit 14fda6a85834f4737370e205c1010d4e13036c6f) * [Oztechan/CCC#2885] Create test module --- README.md | 3 +++ settings.gradle.kts | 1 + test/test.gradle.kts | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 test/test.gradle.kts diff --git a/README.md b/README.md index 1a0f28d44e..461e0ccba1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ graph TD; common-->backend(backend) submodule{submodule} + + test ``` All the modules in the project are grouped into 6 targets: @@ -45,6 +47,7 @@ All the modules in the project are grouped into 6 targets: - `client` is a KMM module that shared between `ios` and `android`. - `common` is a KMP modules that shared between all the platforms (`android`, `ios` and `backend`) - `submodule` these are different git repositories and can be used in any of these modules. (arrows are not shown for the sake of simplicity) +- `test` contains test cases for architecture and coding conventions ## How to clone diff --git a/settings.gradle.kts b/settings.gradle.kts index c96b82880e..b7ee701d70 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -92,6 +92,7 @@ include( // DataSource modules ":common:datasource:conversion", // endregion + ":test", ) // region Git Submodules independent modules and project hosted in different repository diff --git a/test/test.gradle.kts b/test/test.gradle.kts new file mode 100644 index 0000000000..ba70a3d819 --- /dev/null +++ b/test/test.gradle.kts @@ -0,0 +1,3 @@ +plugins { + id(libs.plugins.jvm.get().pluginId) +} From 9ec4157d96055f0671fa1bf2af5ee29d6ef274d6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 21 Oct 2023 12:20:07 +0200 Subject: [PATCH 20/81] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-config-ktx to v21.5.0 (#2880) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fbf52eb4cb..5f06bc47ce 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ koinKtor = "3.5.1" ktor = "2.3.4" multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" -firebaseRemoteConfig = "21.4.1" +firebaseRemoteConfig = "21.5.0" gsm = "4.4.0" firebasePer = "20.4.1" firebasePerPlugin = "1.4.2" From 433249d01047b4201365fc4e764bdbea2daa196a Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 21 Oct 2023 18:54:57 +0200 Subject: [PATCH 21/81] [Oztechan/CCC#2888] Create test cases for packaging check (#2889) --- gradle/libs.versions.toml | 2 + .../com/oztechan/ccc/test/PackagingTest.kt | 169 ++++++++++++++++++ test/test.gradle.kts | 7 + 3 files changed, 178 insertions(+) create mode 100644 test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f06bc47ce..b71b5814ea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -44,6 +44,7 @@ mockative = "2.0.1" firebaseCrashlytics = "18.4.3" anrWatchDog = "1.4.0" kermit = "2.0.2" +konsist = "0.11.0" [libraries] # COMMON @@ -64,6 +65,7 @@ common-mockative = { module = "io.mockative:mockative", version.ref = "mockative common-kermit = { module = "co.touchlab:kermit", version.ref = "kermit" } common-kermitCrashlytics = { module = "co.touchlab:kermit-crashlytics", version.ref = "kermit" } common-detektFormatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } +common-konsist = { module = "com.lemonappdev:konsist", version.ref = "konsist" } # ANDROID android-androidDesugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "androidDesugaring" } diff --git a/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt b/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt new file mode 100644 index 0000000000..d7bfed39e9 --- /dev/null +++ b/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt @@ -0,0 +1,169 @@ +package com.oztechan.ccc.test + +import com.lemonappdev.konsist.api.Konsist +import com.lemonappdev.konsist.api.ext.list.withNameEndingWith +import com.lemonappdev.konsist.api.ext.list.withoutNameEndingWith +import com.lemonappdev.konsist.api.verify.assert +import org.junit.Test + +class PackagingTest { + @Test + fun `classes with 'ViewModel' suffix should reside in 'viewmodel' package`() { + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("ViewModel") + .assert { + println(it.name) + it.resideInPackage("..viewmodel..") + } + } + + @Test + fun `classes with 'Repository' suffix should reside in 'repository' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Repository") + .assert { + println(it.name) + it.resideInPackage("..repository..") + } + + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("RepositoryImpl") + .assert { + println(it.name) + it.resideInPackage("..repository..") + } + } + + @Test + fun `classes with 'Storage' suffix should reside in 'storage' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Storage") + .assert { + println(it.name) + it.resideInPackage("..storage..") + } + + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("StorageImpl") + .assert { + println(it.name) + it.resideInPackage("..storage..") + } + } + + @Test + fun `classes with 'DataSource' suffix should reside in 'datasource' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("DataSource") + .assert { + println(it.name) + it.resideInPackage("..datasource..") + } + + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("DataSourceImpl") + .assert { + println(it.name) + it.resideInPackage("..datasource..") + } + } + + @Test + fun `classes with 'Service' suffix should reside in 'service' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Service") + .withoutNameEndingWith("ConfigService") + .assert { + println(it.name) + it.resideInPackage("..service..") + } + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("ServiceImpl") + .withoutNameEndingWith("ConfigServiceImpl") + .assert { + println(it.name) + it.resideInPackage("..service..") + } + } + + @Test + fun `classes with 'ConfigService' suffix should reside in 'configservice' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("ConfigService") + .assert { + println(it.name) + it.resideInPackage("..configservice..") + } + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("ConfigServiceImpl") + .assert { + println(it.name) + it.resideInPackage("..configservice..") + } + } + + @Test + fun `classes with 'Controller' suffix should reside in 'controller' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Controller") + .assert { + println(it.name) + it.resideInPackage("..controller..") + } + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("ControllerImpl") + .assert { + println(it.name) + it.resideInPackage("..controller..") + } + } + + @Test + fun `classes with 'Persistence' suffix should reside in 'persistence' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Persistence") + .assert { + println(it.name) + it.resideInPackage("..persistence..") + } + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("PersistenceImpl") + .assert { + println(it.name) + it.resideInPackage("..persistence..") + } + } + + @Test + fun `classes with 'Api' suffix should reside in 'api' package`() { + Konsist.scopeFromProject() + .interfaces() + .withNameEndingWith("Api") + .assert { + println(it.name) + it.resideInPackage("..api..") + } + Konsist.scopeFromProject() + .classes() + .withNameEndingWith("ApiImpl") + .assert { + println(it.name) + it.resideInPackage("..api..") + } + } +} diff --git a/test/test.gradle.kts b/test/test.gradle.kts index ba70a3d819..e1fc0b5864 100644 --- a/test/test.gradle.kts +++ b/test/test.gradle.kts @@ -1,3 +1,10 @@ plugins { id(libs.plugins.jvm.get().pluginId) } + +dependencies { + libs.common.apply { + testImplementation(test) + testImplementation(konsist) + } +} From d0d2eb7d46ad8eceb5620546bacc66c0ccb7bee9 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 21 Oct 2023 21:06:46 +0200 Subject: [PATCH 22/81] [Oztechan/CCC#2886] Create rules for testing practices (#2890) --- .../android/ui/mobile/util/DeviceUtilTest.kt | 2 +- .../viewmodel/widget/WidgetViewModelTest.kt | 2 +- .../ad/mapper/AdConfigMapperTest.kt | 2 +- .../review/mapper/ReviewConfigMapperTest.kt | 2 +- .../update/mapper/UpdateConfigMapperTest.kt | 2 +- .../core/persistence/FlowPersistenceTest.kt | 2 +- .../core/remoteconfig/util/ParserTest.kt | 2 +- .../client/core/shared/util/FormatUtilTest.kt | 2 +- .../viewmodel/premium/util/PremiumUtilTest.kt | 2 +- .../database/base/BaseDBDataSourceTest.kt | 2 +- .../network/base/BaseNetworkServiceTest.kt | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- .../com/oztechan/ccc/test/PackagingTest.kt | 2 +- .../oztechan/ccc/test/TestingPracticesTest.kt | 41 +++++++++++++++++++ 15 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 test/src/test/kotlin/com/oztechan/ccc/test/TestingPracticesTest.kt diff --git a/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/DeviceUtilTest.kt b/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/DeviceUtilTest.kt index 635f87f1ce..291b5b2e2e 100644 --- a/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/DeviceUtilTest.kt +++ b/android/ui/mobile/src/test/kotlin/com/oztechan/ccc/android/ui/mobile/util/DeviceUtilTest.kt @@ -5,7 +5,7 @@ import com.oztechan.ccc.client.core.shared.model.AppTheme import org.junit.Test import kotlin.test.assertEquals -class DeviceUtilTest { +internal class DeviceUtilTest { @Test fun getThemeMode() { assertEquals( diff --git a/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt b/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt index 6e0829b5c3..7896fa31ce 100644 --- a/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt +++ b/android/viewmodel/widget/src/test/kotlin/com/oztechan/ccc/android/viewmodel/widget/WidgetViewModelTest.kt @@ -35,7 +35,7 @@ import kotlin.test.assertIs import kotlin.test.assertNotNull import kotlin.time.Duration.Companion.days -class WidgetViewModelTest { +internal class WidgetViewModelTest { private val viewModel: WidgetViewModel by lazy { WidgetViewModel( diff --git a/client/configservice/ad/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/ad/mapper/AdConfigMapperTest.kt b/client/configservice/ad/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/ad/mapper/AdConfigMapperTest.kt index 7aa057832e..470b96ebfa 100644 --- a/client/configservice/ad/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/ad/mapper/AdConfigMapperTest.kt +++ b/client/configservice/ad/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/ad/mapper/AdConfigMapperTest.kt @@ -4,7 +4,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import com.oztechan.ccc.client.core.remoteconfig.model.AdConfig as AdConfigRCModel -class AdConfigMapperTest { +internal class AdConfigMapperTest { @Test fun toAdConfigModel() { diff --git a/client/configservice/review/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/review/mapper/ReviewConfigMapperTest.kt b/client/configservice/review/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/review/mapper/ReviewConfigMapperTest.kt index eddd7a6fcc..721553155f 100644 --- a/client/configservice/review/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/review/mapper/ReviewConfigMapperTest.kt +++ b/client/configservice/review/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/review/mapper/ReviewConfigMapperTest.kt @@ -4,7 +4,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import com.oztechan.ccc.client.core.remoteconfig.model.ReviewConfig as AppReviewRCModel -class ReviewConfigMapperTest { +internal class ReviewConfigMapperTest { @Test fun toReviewConfigModel() { diff --git a/client/configservice/update/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/update/mapper/UpdateConfigMapperTest.kt b/client/configservice/update/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/update/mapper/UpdateConfigMapperTest.kt index 31c041f02e..743ad53e58 100644 --- a/client/configservice/update/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/update/mapper/UpdateConfigMapperTest.kt +++ b/client/configservice/update/src/commonTest/kotlin/com/oztechan/ccc/client/configservice/update/mapper/UpdateConfigMapperTest.kt @@ -4,7 +4,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import com.oztechan.ccc.client.core.remoteconfig.model.UpdateConfig as AppUpdateRCModel -class UpdateConfigMapperTest { +internal class UpdateConfigMapperTest { @Test fun toUpdateConfigModel() { diff --git a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt index 8d9cb82159..48df14a797 100644 --- a/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt +++ b/client/core/persistence/src/commonTest/kotlin/com/oztechan/ccc/client/core/persistence/FlowPersistenceTest.kt @@ -22,7 +22,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFailsWith @Suppress("OPT_IN_USAGE") -class FlowPersistenceTest { +internal class FlowPersistenceTest { private val flowPersistence: FlowPersistence by lazy { FlowPersistenceImpl(flowSettings) } diff --git a/client/core/remoteconfig/src/commonTest/kotlin/com/oztechan/ccc/client/core/remoteconfig/util/ParserTest.kt b/client/core/remoteconfig/src/commonTest/kotlin/com/oztechan/ccc/client/core/remoteconfig/util/ParserTest.kt index c8a293fa6a..4b36a752e3 100644 --- a/client/core/remoteconfig/src/commonTest/kotlin/com/oztechan/ccc/client/core/remoteconfig/util/ParserTest.kt +++ b/client/core/remoteconfig/src/commonTest/kotlin/com/oztechan/ccc/client/core/remoteconfig/util/ParserTest.kt @@ -6,7 +6,7 @@ import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertNull -class ParserTest { +internal class ParserTest { @BeforeTest fun setup() { diff --git a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/FormatUtilTest.kt b/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/FormatUtilTest.kt index 9952db84b6..f0e0e374c6 100644 --- a/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/FormatUtilTest.kt +++ b/client/core/shared/src/commonTest/kotlin/com/oztechan/ccc/client/core/shared/util/FormatUtilTest.kt @@ -3,7 +3,7 @@ package com.oztechan.ccc.client.core.shared.util import kotlin.test.Test import kotlin.test.assertEquals -class FormatUtilTest { +internal class FormatUtilTest { @Test fun toSupportedCharacters() { assertEquals("..-", ",٫ −".toSupportedCharacters()) diff --git a/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt index 556beca873..507f7c908a 100644 --- a/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt +++ b/client/viewmodel/premium/src/commonTest/kotlin/com/oztechan/ccc/client/viewmodel/premium/util/PremiumUtilTest.kt @@ -9,7 +9,7 @@ import kotlinx.datetime.plus import kotlin.test.Test import kotlin.test.assertEquals -class PremiumUtilTest { +internal class PremiumUtilTest { @Test fun calculatePremiumEnd() = nowAsLong().let { diff --git a/common/core/database/src/commonTest/kotlin/com/oztechan/ccc/common/core/database/base/BaseDBDataSourceTest.kt b/common/core/database/src/commonTest/kotlin/com/oztechan/ccc/common/core/database/base/BaseDBDataSourceTest.kt index 7c668e8018..c670b4d8d4 100644 --- a/common/core/database/src/commonTest/kotlin/com/oztechan/ccc/common/core/database/base/BaseDBDataSourceTest.kt +++ b/common/core/database/src/commonTest/kotlin/com/oztechan/ccc/common/core/database/base/BaseDBDataSourceTest.kt @@ -6,7 +6,7 @@ import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertFailsWith -class BaseDBDataSourceTest { +internal class BaseDBDataSourceTest { @Suppress("OPT_IN_USAGE") private val subject = object : BaseDBDataSource(UnconfinedTestDispatcher()) { suspend fun query( diff --git a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/base/BaseNetworkServiceTest.kt b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/base/BaseNetworkServiceTest.kt index 910250035a..a1ce03c81a 100644 --- a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/base/BaseNetworkServiceTest.kt +++ b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/base/BaseNetworkServiceTest.kt @@ -15,7 +15,7 @@ import kotlin.coroutines.cancellation.CancellationException import kotlin.test.Test import kotlin.test.assertFailsWith -class BaseNetworkServiceTest { +internal class BaseNetworkServiceTest { @Suppress("OPT_IN_USAGE") private val subject = object : BaseNetworkService(UnconfinedTestDispatcher()) { diff --git a/submodule/parsermob b/submodule/parsermob index 144d73ddf0..9f66297a77 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 144d73ddf0ba3f7b2b7cebcf36919869e30ffbdf +Subproject commit 9f66297a77cba2850c7ef0685126ceb8573a1f7a diff --git a/submodule/scopemob b/submodule/scopemob index bf53c7402b..51247f9280 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit bf53c7402b35ca5969b70cd341641e898a682ad0 +Subproject commit 51247f92809d3c9fbd26d0e5f8401f851d7993c0 diff --git a/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt b/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt index d7bfed39e9..6e9de4403d 100644 --- a/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt +++ b/test/src/test/kotlin/com/oztechan/ccc/test/PackagingTest.kt @@ -6,7 +6,7 @@ import com.lemonappdev.konsist.api.ext.list.withoutNameEndingWith import com.lemonappdev.konsist.api.verify.assert import org.junit.Test -class PackagingTest { +internal class PackagingTest { @Test fun `classes with 'ViewModel' suffix should reside in 'viewmodel' package`() { Konsist.scopeFromProject() diff --git a/test/src/test/kotlin/com/oztechan/ccc/test/TestingPracticesTest.kt b/test/src/test/kotlin/com/oztechan/ccc/test/TestingPracticesTest.kt new file mode 100644 index 0000000000..9e93a31ab6 --- /dev/null +++ b/test/src/test/kotlin/com/oztechan/ccc/test/TestingPracticesTest.kt @@ -0,0 +1,41 @@ +package com.oztechan.ccc.test + +import com.lemonappdev.konsist.api.Konsist +import com.lemonappdev.konsist.api.ext.list.properties +import com.lemonappdev.konsist.api.ext.list.withNameEndingWith +import com.lemonappdev.konsist.api.ext.list.withoutAllAnnotationsOf +import com.lemonappdev.konsist.api.ext.provider.hasAnnotationOf +import com.lemonappdev.konsist.api.verify.assert +import kotlin.test.Test + +internal class TestingPracticesTest { + + @Test + fun `classes with 'Test' Annotation should have 'Test' suffix`() { + Konsist + .scopeFromTest() + .classes() + .filter { it.functions().any { func -> func.hasAnnotationOf() } } + .assert { it.hasNameEndingWith("Test") } + } + + @Test + fun `test classes should be internal`() { + Konsist + .scopeFromTest() + .classes() + .withNameEndingWith("Test") + .assert { it.hasInternalModifier } + } + + @Test + fun `test classes should have all members private besides tests`() { + Konsist + .scopeFromTest() + .classes() + .withNameEndingWith("Test") + .properties() + .withoutAllAnnotationsOf(Test::class) + .assert { it.hasPrivateModifier || it.hasProtectedModifier } + } +} From 8d633b46b9061d3b031647b5ea4cc555aeca87c8 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 21 Oct 2023 23:35:59 +0200 Subject: [PATCH 23/81] [Oztechan/CCC#2891] Add Conventional Tests (#2892) --- .../com/oztechan/ccc/test/ConventionTest.kt | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 test/src/test/kotlin/com/oztechan/ccc/test/ConventionTest.kt diff --git a/test/src/test/kotlin/com/oztechan/ccc/test/ConventionTest.kt b/test/src/test/kotlin/com/oztechan/ccc/test/ConventionTest.kt new file mode 100644 index 0000000000..17c0cad174 --- /dev/null +++ b/test/src/test/kotlin/com/oztechan/ccc/test/ConventionTest.kt @@ -0,0 +1,109 @@ +package com.oztechan.ccc.test + +import com.lemonappdev.konsist.api.KoModifier +import com.lemonappdev.konsist.api.Konsist +import com.lemonappdev.konsist.api.declaration.KoFunctionDeclaration +import com.lemonappdev.konsist.api.declaration.KoPropertyDeclaration +import com.lemonappdev.konsist.api.ext.list.indexOfFirstInstance +import com.lemonappdev.konsist.api.ext.list.indexOfLastInstance +import com.lemonappdev.konsist.api.verify.assert +import com.lemonappdev.konsist.api.verify.assertNot +import org.junit.Test + +internal class ConventionTest { + @Test + fun `properties are declared before functions`() { + Konsist + .scopeFromProject() + .classes() + .assert { + println(it.name) + val lastKoPropertyDeclarationIndex = it + .declarations(includeNested = false, includeLocal = false) + .indexOfLastInstance() + + val firstKoFunctionDeclarationIndex = it + .declarations(includeNested = false, includeLocal = false) + .indexOfFirstInstance() + + if (lastKoPropertyDeclarationIndex != -1 && firstKoFunctionDeclarationIndex != -1) { + lastKoPropertyDeclarationIndex < firstKoFunctionDeclarationIndex + } else { + true + } + } + } + + @Test + fun `companion object is last declaration in the class`() { + Konsist + .scopeFromProject() + .classes() + .assert { + println(it.name) + + val companionObject = it.objects(includeNested = false).lastOrNull { obj -> + obj.hasModifiers(KoModifier.COMPANION) + } + + if (companionObject != null) { + it.declarations(includeNested = false, includeLocal = false) + .last() == companionObject + } else { + true + } + } + } + + @Test + fun `no empty files allowed`() { + Konsist + .scopeFromProject() + .files + .assertNot { + println(it.name) + it.text.isEmpty() + } + } + + @Test + fun `package name must match file path`() { + Konsist + .scopeFromProject() + .packages + .assert { + println(it.name) + it.hasMatchingPath + } + } + + @Test + fun `no wildcard imports allowed`() { + Konsist + .scopeFromProject() + .imports + .assertNot { + println(it.name) + it.isWildcard + } + } + + @Test + fun `every file in module reside in module specific package unless it is submodule`() { + Konsist + .scopeFromProject() + .files + .assert { + it.moduleName.replace("/", ".").let { modulePackaging -> + println( + it.moduleName + "==" + it.name + "==" + it.packagee?.fullyQualifiedName + "==" + modulePackaging + ) + if (modulePackaging.contains("submodule")) { + true + } else { + it.packagee?.fullyQualifiedName?.startsWith("com.oztechan.ccc.$modulePackaging") + } + } + } + } +} From f16dfdc305d7248ad8ea50cd949b547a65695a9b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 13:00:31 +0200 Subject: [PATCH 24/81] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-crashlytics-ktx to v18.5.0 (#2881) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b71b5814ea..f8f8bf20fd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -41,7 +41,7 @@ splashScreen = "1.0.1" kover = "0.6.1" rootBeer = "0.1.0" mockative = "2.0.1" -firebaseCrashlytics = "18.4.3" +firebaseCrashlytics = "18.5.0" anrWatchDog = "1.4.0" kermit = "2.0.2" konsist = "0.11.0" From 2e97d4fe8836352d10d19552dbc20f95666fd80d Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 22 Oct 2023 14:07:33 +0200 Subject: [PATCH 25/81] [Oztechan/CCC#2895] Replace deprecated set-output in GitHub Action files (#2896) --- .github/workflows/main.yml | 14 +++++++------- .github/workflows/publish.yml | 2 +- .github/workflows/release.yml | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6360132710..4f1f055582 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -109,7 +109,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT DistributeAndroid: runs-on: ubuntu-latest @@ -150,7 +150,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT XCodeBuild: runs-on: macos-13 @@ -208,7 +208,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT DistributeIOS: runs-on: macos-13 @@ -237,7 +237,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT Quality: runs-on: macos-13 @@ -273,7 +273,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT UploadQualityReports: runs-on: ubuntu-latest @@ -320,7 +320,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT CodeAnalysis: runs-on: ubuntu-latest @@ -353,7 +353,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT Notify: runs-on: ubuntu-latest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d09714397e..c5c305aa78 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT Notify: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fa037f8e0..c93d885de1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,7 +109,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT UploadToGooglePlay: runs-on: ubuntu-latest @@ -144,7 +144,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT UploadToHuaweiAppGallery: runs-on: ubuntu-latest @@ -175,7 +175,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT DeployToServer: runs-on: ubuntu-latest @@ -206,7 +206,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT UploadToAppStore: runs-on: macos-13 @@ -240,7 +240,7 @@ jobs: - name: Set Job Status id: status - run: echo "::set-output name=status::success" + run: echo "status=success" >> $GITHUB_OUTPUT Notify: runs-on: ubuntu-latest From 7f526f6183ac59584ddc6e4061ea0b36dfb51aea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:04:36 +0200 Subject: [PATCH 26/81] [Oztechan/CCC#1457] Dependency update dependency com.huawei.hms:ads-prime to v3.4.66.303 (#2883) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f8f8bf20fd..5ea38bcc30 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,7 +25,7 @@ firebasePer = "20.4.1" firebasePerPlugin = "1.4.2" crashlytics = "2.9.9" googleAds = "22.4.0" -huaweiAds = "3.4.66.301" +huaweiAds = "3.4.66.303" huaweiOsm="1.3.35" navigation = "2.7.4" playCore = "1.10.3" From c61eb7e654426b5806dba6433e03255e266a674b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:35:35 +0200 Subject: [PATCH 27/81] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to 7b62f7a (#2893) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index b20c0d2dbe..7b62f7a35a 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit b20c0d2dbea2429bf3ee92a6b5208e09fd35c48b +Subproject commit 7b62f7a35a12a779f916978b50d284ef1c7319c3 From 06c43605f7c6b845dd1eef3fd2ba9e5ee7ace4e7 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Mon, 23 Oct 2023 16:41:43 +0200 Subject: [PATCH 28/81] [Oztechan/CCC#2903] Move org.jetbrains.kotlin.multiplatform to alias (#2904) * [Oztechan/CCC#2903] Move org.jetbrains.kotlin.multiplatform to alias * [Oztechan/CCC#2903] Move org.jetbrains.kotlin.multiplatform to alias --- CCC.gradle.kts | 1 + client/configservice/ad/client-configservice-ad.gradle.kts | 2 +- .../configservice/review/client-configservice-review.gradle.kts | 2 +- .../configservice/update/client-configservice-update.gradle.kts | 2 +- client/core/analytics/client-core-analytics.gradle.kts | 2 +- client/core/persistence/client-core-persistence.gradle.kts | 2 +- client/core/remoteconfig/client-core-remoteconfig.gradle.kts | 2 +- client/core/res/client-core-res.gradle.kts | 2 +- client/core/shared/client-core-shared.gradle.kts | 2 +- client/core/viewmodel/client-core-viewmodel.gradle.kts | 2 +- .../datasource/currency/client-datasource-currency.gradle.kts | 2 +- client/datasource/watcher/client-datasource-watcher.gradle.kts | 2 +- .../repository/adcontrol/client-repository-adcontrol.gradle.kts | 2 +- .../repository/appconfig/client-repository-appconfig.gradle.kts | 2 +- client/service/backend/client-service-backend.gradle.kts | 2 +- client/storage/app/client-storage-app.gradle.kts | 2 +- .../storage/calculation/client-storage-calculation.gradle.kts | 2 +- .../viewmodel/calculator/client-viewmodel-calculator.gradle.kts | 2 +- .../viewmodel/currencies/client-viewmodel-currencies.gradle.kts | 2 +- client/viewmodel/main/client-viewmodel-main.gradle.kts | 2 +- client/viewmodel/premium/client-viewmodel-premium.gradle.kts | 2 +- .../selectcurrency/client-viewmodel-selectcurrency.gradle.kts | 2 +- client/viewmodel/settings/client-viewmodel-settings.gradle.kts | 2 +- client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts | 2 +- common/core/database/common-core-database.gradle.kts | 2 +- .../core/infrastructure/common-core-infrastructure.gradle.kts | 2 +- common/core/model/common-core-model.gradle.kts | 2 +- common/core/network/common-core-network.gradle.kts | 2 +- .../conversion/common-datasource-conversion.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- ios/provider/ios-provider.gradle.kts | 2 +- ios/repository/background/ios-repository-background.gradle.kts | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 35 files changed, 35 insertions(+), 34 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 7a62e54e33..1a0eb81bb2 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { libs.plugins.apply { + alias(kotlinMultiplatform).apply(false) alias(kover) alias(detekt) } diff --git a/client/configservice/ad/client-configservice-ad.gradle.kts b/client/configservice/ad/client-configservice-ad.gradle.kts index 691624d0fd..1c933940c2 100644 --- a/client/configservice/ad/client-configservice-ad.gradle.kts +++ b/client/configservice/ad/client-configservice-ad.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) } } diff --git a/client/configservice/review/client-configservice-review.gradle.kts b/client/configservice/review/client-configservice-review.gradle.kts index 8ca5422d59..5175d8c5d9 100644 --- a/client/configservice/review/client-configservice-review.gradle.kts +++ b/client/configservice/review/client-configservice-review.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) } } diff --git a/client/configservice/update/client-configservice-update.gradle.kts b/client/configservice/update/client-configservice-update.gradle.kts index 8bf182c0cc..379ae93a48 100644 --- a/client/configservice/update/client-configservice-update.gradle.kts +++ b/client/configservice/update/client-configservice-update.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) } } diff --git a/client/core/analytics/client-core-analytics.gradle.kts b/client/core/analytics/client-core-analytics.gradle.kts index cd403c5b98..90525c0cc6 100644 --- a/client/core/analytics/client-core-analytics.gradle.kts +++ b/client/core/analytics/client-core-analytics.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) } } diff --git a/client/core/persistence/client-core-persistence.gradle.kts b/client/core/persistence/client-core-persistence.gradle.kts index 4ce6075803..0621a5be35 100644 --- a/client/core/persistence/client-core-persistence.gradle.kts +++ b/client/core/persistence/client-core-persistence.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts index 2976f3ea5e..751522a4eb 100644 --- a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts +++ b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(kotlinXSerialization.get().pluginId) } } diff --git a/client/core/res/client-core-res.gradle.kts b/client/core/res/client-core-res.gradle.kts index 344848153b..2c5992c82d 100644 --- a/client/core/res/client-core-res.gradle.kts +++ b/client/core/res/client-core-res.gradle.kts @@ -2,7 +2,7 @@ import io.gitlab.arturbosch.detekt.Detekt plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) id(mokoResources.get().pluginId) } diff --git a/client/core/shared/client-core-shared.gradle.kts b/client/core/shared/client-core-shared.gradle.kts index 6daad745b3..afb0be71d5 100644 --- a/client/core/shared/client-core-shared.gradle.kts +++ b/client/core/shared/client-core-shared.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.multiplatform.get().pluginId) + alias(libs.plugins.kotlinMultiplatform) } kotlin { @Suppress("OPT_IN_USAGE") diff --git a/client/core/viewmodel/client-core-viewmodel.gradle.kts b/client/core/viewmodel/client-core-viewmodel.gradle.kts index f09783ecb3..bfb770687a 100644 --- a/client/core/viewmodel/client-core-viewmodel.gradle.kts +++ b/client/core/viewmodel/client-core-viewmodel.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) } } diff --git a/client/datasource/currency/client-datasource-currency.gradle.kts b/client/datasource/currency/client-datasource-currency.gradle.kts index 54512438b6..118a0eb829 100644 --- a/client/datasource/currency/client-datasource-currency.gradle.kts +++ b/client/datasource/currency/client-datasource-currency.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/datasource/watcher/client-datasource-watcher.gradle.kts b/client/datasource/watcher/client-datasource-watcher.gradle.kts index bd2dd0c6c2..42e39347b1 100644 --- a/client/datasource/watcher/client-datasource-watcher.gradle.kts +++ b/client/datasource/watcher/client-datasource-watcher.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts index e40d79e0bb..b469c0dd2e 100644 --- a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts +++ b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) alias(ksp) } } diff --git a/client/repository/appconfig/client-repository-appconfig.gradle.kts b/client/repository/appconfig/client-repository-appconfig.gradle.kts index 8bdbe0a034..b09e2cf914 100644 --- a/client/repository/appconfig/client-repository-appconfig.gradle.kts +++ b/client/repository/appconfig/client-repository-appconfig.gradle.kts @@ -5,7 +5,7 @@ import com.codingfeline.buildkonfig.gradle.BuildKonfigExtension plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(buildKonfig.get().pluginId) alias(ksp) } diff --git a/client/service/backend/client-service-backend.gradle.kts b/client/service/backend/client-service-backend.gradle.kts index 6868e53595..5b261d8e58 100644 --- a/client/service/backend/client-service-backend.gradle.kts +++ b/client/service/backend/client-service-backend.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/storage/app/client-storage-app.gradle.kts b/client/storage/app/client-storage-app.gradle.kts index 85d84797f1..3bb9507a21 100644 --- a/client/storage/app/client-storage-app.gradle.kts +++ b/client/storage/app/client-storage-app.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/storage/calculation/client-storage-calculation.gradle.kts b/client/storage/calculation/client-storage-calculation.gradle.kts index 9caa8c1b0b..8634b125aa 100644 --- a/client/storage/calculation/client-storage-calculation.gradle.kts +++ b/client/storage/calculation/client-storage-calculation.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts index e3deac41f1..fa570e4922 100644 --- a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts +++ b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts index bcc278d49c..d266d6986b 100644 --- a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts +++ b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/main/client-viewmodel-main.gradle.kts b/client/viewmodel/main/client-viewmodel-main.gradle.kts index 1429cf1461..a3ed0c76cf 100644 --- a/client/viewmodel/main/client-viewmodel-main.gradle.kts +++ b/client/viewmodel/main/client-viewmodel-main.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts index 5c83dac60c..078aec83a1 100644 --- a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts +++ b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts index 539b578ee8..88a8500fcb 100644 --- a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts +++ b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts index e6929e9d93..9e163283ae 100644 --- a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts +++ b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts index 456f0017ed..af70bbf2ed 100644 --- a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts +++ b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/common/core/database/common-core-database.gradle.kts b/common/core/database/common-core-database.gradle.kts index 618c448e37..32ead6ad2f 100644 --- a/common/core/database/common-core-database.gradle.kts +++ b/common/core/database/common-core-database.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) id(sqlDelight.get().pluginId) } diff --git a/common/core/infrastructure/common-core-infrastructure.gradle.kts b/common/core/infrastructure/common-core-infrastructure.gradle.kts index e4a42582d4..62f0b09e33 100644 --- a/common/core/infrastructure/common-core-infrastructure.gradle.kts +++ b/common/core/infrastructure/common-core-infrastructure.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.multiplatform.get().pluginId) + alias(libs.plugins.kotlinMultiplatform) } kotlin { diff --git a/common/core/model/common-core-model.gradle.kts b/common/core/model/common-core-model.gradle.kts index 9906ec6887..66ea564727 100644 --- a/common/core/model/common-core-model.gradle.kts +++ b/common/core/model/common-core-model.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.multiplatform.get().pluginId) + alias(libs.plugins.kotlinMultiplatform) } kotlin { diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index 2316b7cd08..90f8839b2b 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -5,7 +5,7 @@ import config.key.secret plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(kotlinXSerialization.get().pluginId) id(androidLib.get().pluginId) id(buildKonfig.get().pluginId) diff --git a/common/datasource/conversion/common-datasource-conversion.gradle.kts b/common/datasource/conversion/common-datasource-conversion.gradle.kts index 4a53c96bf4..8a6bf8aa1e 100644 --- a/common/datasource/conversion/common-datasource-conversion.gradle.kts +++ b/common/datasource/conversion/common-datasource-conversion.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) id(androidLib.get().pluginId) alias(ksp) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5ea38bcc30..78753baecf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -134,7 +134,7 @@ classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kove [plugins] -multiplatform = { id = "org.jetbrains.kotlin.multiplatform" } +kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } android = { id = "org.jetbrains.kotlin.android" } jvm = { id = "org.jetbrains.kotlin.jvm" } androidApp = { id = "com.android.application" } diff --git a/ios/provider/ios-provider.gradle.kts b/ios/provider/ios-provider.gradle.kts index 5f7a213f97..aab9d4c415 100644 --- a/ios/provider/ios-provider.gradle.kts +++ b/ios/provider/ios-provider.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.multiplatform.get().pluginId) + alias(libs.plugins.kotlinMultiplatform) } kotlin { diff --git a/ios/repository/background/ios-repository-background.gradle.kts b/ios/repository/background/ios-repository-background.gradle.kts index d1aa153460..2f99dc7947 100644 --- a/ios/repository/background/ios-repository-background.gradle.kts +++ b/ios/repository/background/ios-repository-background.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(multiplatform.get().pluginId) + alias(kotlinMultiplatform) alias(ksp) } } diff --git a/submodule/logmob b/submodule/logmob index 7b62f7a35a..543a97e834 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 7b62f7a35a12a779f916978b50d284ef1c7319c3 +Subproject commit 543a97e8340b878f25707d80c70b9d056691fdd7 diff --git a/submodule/parsermob b/submodule/parsermob index 9f66297a77..06896a2bb9 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 9f66297a77cba2850c7ef0685126ceb8573a1f7a +Subproject commit 06896a2bb907c6a5398f925d462bdb484745ad5b diff --git a/submodule/scopemob b/submodule/scopemob index 51247f9280..f32568fb1e 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 51247f92809d3c9fbd26d0e5f8401f851d7993c0 +Subproject commit f32568fb1e5b7b8937c82c65f59eb29756f9bc40 From 815e96c93e4e2ac2144db1b267b7da9a38d33d7a Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 24 Oct 2023 09:15:49 +0200 Subject: [PATCH 29/81] [Oztechan/CCC#2908] Move org.jetbrains.kotlin.android to alias (#2909) --- CCC.gradle.kts | 1 + android/app/android-app.gradle.kts | 2 +- android/core/ad/android-core-ad.gradle.kts | 2 +- android/core/billing/android-core-billing.gradle.kts | 2 +- android/ui/mobile/android-ui-mobile.gradle.kts | 2 +- android/ui/widget/android-ui-widget.gradle.kts | 2 +- android/viewmodel/widget/android-viewmodel-widget.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- submodule/basemob | 2 +- 9 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 1a0eb81bb2..92acc092ad 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -7,6 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { libs.plugins.apply { alias(kotlinMultiplatform).apply(false) + alias(kotlinAndroid).apply(false) alias(kover) alias(detekt) } diff --git a/android/app/android-app.gradle.kts b/android/app/android-app.gradle.kts index 1c0f5e51f0..3dfa22d0a7 100644 --- a/android/app/android-app.gradle.kts +++ b/android/app/android-app.gradle.kts @@ -13,7 +13,7 @@ plugins { id(crashlytics.get().pluginId) id(googleServices.get().pluginId) id(firebasePerPlugin.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) } } diff --git a/android/core/ad/android-core-ad.gradle.kts b/android/core/ad/android-core-ad.gradle.kts index fb5d7d719b..d0d683a8f6 100644 --- a/android/core/ad/android-core-ad.gradle.kts +++ b/android/core/ad/android-core-ad.gradle.kts @@ -10,7 +10,7 @@ import config.key.string plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) } } diff --git a/android/core/billing/android-core-billing.gradle.kts b/android/core/billing/android-core-billing.gradle.kts index 2009e21c0b..3d17d5af58 100644 --- a/android/core/billing/android-core-billing.gradle.kts +++ b/android/core/billing/android-core-billing.gradle.kts @@ -4,7 +4,7 @@ import config.DeviceFlavour.Companion.implementation plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) } } diff --git a/android/ui/mobile/android-ui-mobile.gradle.kts b/android/ui/mobile/android-ui-mobile.gradle.kts index efd8be6815..c97d26b743 100644 --- a/android/ui/mobile/android-ui-mobile.gradle.kts +++ b/android/ui/mobile/android-ui-mobile.gradle.kts @@ -4,7 +4,7 @@ import config.DeviceFlavour.Companion.implementation plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) id(safeArgs.get().pluginId) // todo can be removed once compose migration done } } diff --git a/android/ui/widget/android-ui-widget.gradle.kts b/android/ui/widget/android-ui-widget.gradle.kts index e7a4da11a1..58731f1009 100644 --- a/android/ui/widget/android-ui-widget.gradle.kts +++ b/android/ui/widget/android-ui-widget.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) } } diff --git a/android/viewmodel/widget/android-viewmodel-widget.gradle.kts b/android/viewmodel/widget/android-viewmodel-widget.gradle.kts index 3cf6f605e8..7157ccfa00 100644 --- a/android/viewmodel/widget/android-viewmodel-widget.gradle.kts +++ b/android/viewmodel/widget/android-viewmodel-widget.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { id(androidLib.get().pluginId) - id(android.get().pluginId) + alias(kotlinAndroid) alias(ksp) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 78753baecf..35e390f16b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -135,7 +135,7 @@ classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kove [plugins] kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -android = { id = "org.jetbrains.kotlin.android" } +kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } jvm = { id = "org.jetbrains.kotlin.jvm" } androidApp = { id = "com.android.application" } androidLib = { id = "com.android.library" } diff --git a/submodule/basemob b/submodule/basemob index 7c8b746c63..9cbc6c2ae6 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 7c8b746c63e7e236ea2073412022f38d7925dd77 +Subproject commit 9cbc6c2ae6856eb1321afbaa5f8ccd6eccfa7bd4 From b18deaa6ebb175d832d0eed9c43d28d4852e713d Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 24 Oct 2023 14:29:32 +0200 Subject: [PATCH 30/81] [Oztechan/CCC#2910] Move com.android.library to alias (#2911) --- CCC.gradle.kts | 1 + android/core/ad/android-core-ad.gradle.kts | 2 +- android/core/billing/android-core-billing.gradle.kts | 2 +- android/ui/mobile/android-ui-mobile.gradle.kts | 2 +- android/ui/widget/android-ui-widget.gradle.kts | 2 +- android/viewmodel/widget/android-viewmodel-widget.gradle.kts | 2 +- client/configservice/ad/client-configservice-ad.gradle.kts | 2 +- .../configservice/review/client-configservice-review.gradle.kts | 2 +- .../configservice/update/client-configservice-update.gradle.kts | 2 +- client/core/analytics/client-core-analytics.gradle.kts | 2 +- client/core/persistence/client-core-persistence.gradle.kts | 2 +- client/core/remoteconfig/client-core-remoteconfig.gradle.kts | 2 +- client/core/res/client-core-res.gradle.kts | 2 +- client/core/viewmodel/client-core-viewmodel.gradle.kts | 2 +- .../datasource/currency/client-datasource-currency.gradle.kts | 2 +- client/datasource/watcher/client-datasource-watcher.gradle.kts | 2 +- .../repository/adcontrol/client-repository-adcontrol.gradle.kts | 2 +- .../repository/appconfig/client-repository-appconfig.gradle.kts | 2 +- client/service/backend/client-service-backend.gradle.kts | 2 +- client/storage/app/client-storage-app.gradle.kts | 2 +- .../storage/calculation/client-storage-calculation.gradle.kts | 2 +- .../viewmodel/calculator/client-viewmodel-calculator.gradle.kts | 2 +- .../viewmodel/currencies/client-viewmodel-currencies.gradle.kts | 2 +- client/viewmodel/main/client-viewmodel-main.gradle.kts | 2 +- client/viewmodel/premium/client-viewmodel-premium.gradle.kts | 2 +- .../selectcurrency/client-viewmodel-selectcurrency.gradle.kts | 2 +- client/viewmodel/settings/client-viewmodel-settings.gradle.kts | 2 +- client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts | 2 +- common/core/database/common-core-database.gradle.kts | 2 +- common/core/network/common-core-network.gradle.kts | 2 +- .../conversion/common-datasource-conversion.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- submodule/basemob | 2 +- submodule/logmob | 2 +- 34 files changed, 34 insertions(+), 33 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 92acc092ad..9c7f03b579 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -8,6 +8,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform).apply(false) alias(kotlinAndroid).apply(false) + alias(androidLibrary).apply(false) alias(kover) alias(detekt) } diff --git a/android/core/ad/android-core-ad.gradle.kts b/android/core/ad/android-core-ad.gradle.kts index d0d683a8f6..c6e48689a4 100644 --- a/android/core/ad/android-core-ad.gradle.kts +++ b/android/core/ad/android-core-ad.gradle.kts @@ -9,7 +9,7 @@ import config.key.string plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinAndroid) } } diff --git a/android/core/billing/android-core-billing.gradle.kts b/android/core/billing/android-core-billing.gradle.kts index 3d17d5af58..23e4901841 100644 --- a/android/core/billing/android-core-billing.gradle.kts +++ b/android/core/billing/android-core-billing.gradle.kts @@ -3,7 +3,7 @@ import config.DeviceFlavour.Companion.implementation plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinAndroid) } } diff --git a/android/ui/mobile/android-ui-mobile.gradle.kts b/android/ui/mobile/android-ui-mobile.gradle.kts index c97d26b743..9c2bf1632b 100644 --- a/android/ui/mobile/android-ui-mobile.gradle.kts +++ b/android/ui/mobile/android-ui-mobile.gradle.kts @@ -3,7 +3,7 @@ import config.DeviceFlavour.Companion.implementation plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinAndroid) id(safeArgs.get().pluginId) // todo can be removed once compose migration done } diff --git a/android/ui/widget/android-ui-widget.gradle.kts b/android/ui/widget/android-ui-widget.gradle.kts index 58731f1009..53c68f765b 100644 --- a/android/ui/widget/android-ui-widget.gradle.kts +++ b/android/ui/widget/android-ui-widget.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinAndroid) } } diff --git a/android/viewmodel/widget/android-viewmodel-widget.gradle.kts b/android/viewmodel/widget/android-viewmodel-widget.gradle.kts index 7157ccfa00..c0a5eaa0fd 100644 --- a/android/viewmodel/widget/android-viewmodel-widget.gradle.kts +++ b/android/viewmodel/widget/android-viewmodel-widget.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinAndroid) alias(ksp) } diff --git a/client/configservice/ad/client-configservice-ad.gradle.kts b/client/configservice/ad/client-configservice-ad.gradle.kts index 1c933940c2..ab1373a516 100644 --- a/client/configservice/ad/client-configservice-ad.gradle.kts +++ b/client/configservice/ad/client-configservice-ad.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) } } diff --git a/client/configservice/review/client-configservice-review.gradle.kts b/client/configservice/review/client-configservice-review.gradle.kts index 5175d8c5d9..a48e499cce 100644 --- a/client/configservice/review/client-configservice-review.gradle.kts +++ b/client/configservice/review/client-configservice-review.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) } } diff --git a/client/configservice/update/client-configservice-update.gradle.kts b/client/configservice/update/client-configservice-update.gradle.kts index 379ae93a48..247cd2140b 100644 --- a/client/configservice/update/client-configservice-update.gradle.kts +++ b/client/configservice/update/client-configservice-update.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) } } diff --git a/client/core/analytics/client-core-analytics.gradle.kts b/client/core/analytics/client-core-analytics.gradle.kts index 90525c0cc6..b7cc621241 100644 --- a/client/core/analytics/client-core-analytics.gradle.kts +++ b/client/core/analytics/client-core-analytics.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) } } diff --git a/client/core/persistence/client-core-persistence.gradle.kts b/client/core/persistence/client-core-persistence.gradle.kts index 0621a5be35..028a39fa05 100644 --- a/client/core/persistence/client-core-persistence.gradle.kts +++ b/client/core/persistence/client-core-persistence.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts index 751522a4eb..ba1a9411d9 100644 --- a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts +++ b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) id(kotlinXSerialization.get().pluginId) } diff --git a/client/core/res/client-core-res.gradle.kts b/client/core/res/client-core-res.gradle.kts index 2c5992c82d..bff34243af 100644 --- a/client/core/res/client-core-res.gradle.kts +++ b/client/core/res/client-core-res.gradle.kts @@ -3,7 +3,7 @@ import io.gitlab.arturbosch.detekt.Detekt plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) id(mokoResources.get().pluginId) } } diff --git a/client/core/viewmodel/client-core-viewmodel.gradle.kts b/client/core/viewmodel/client-core-viewmodel.gradle.kts index bfb770687a..224360db61 100644 --- a/client/core/viewmodel/client-core-viewmodel.gradle.kts +++ b/client/core/viewmodel/client-core-viewmodel.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) } } kotlin { diff --git a/client/datasource/currency/client-datasource-currency.gradle.kts b/client/datasource/currency/client-datasource-currency.gradle.kts index 118a0eb829..a9dc8715a7 100644 --- a/client/datasource/currency/client-datasource-currency.gradle.kts +++ b/client/datasource/currency/client-datasource-currency.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/datasource/watcher/client-datasource-watcher.gradle.kts b/client/datasource/watcher/client-datasource-watcher.gradle.kts index 42e39347b1..45bed5f036 100644 --- a/client/datasource/watcher/client-datasource-watcher.gradle.kts +++ b/client/datasource/watcher/client-datasource-watcher.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts index b469c0dd2e..263b1978ed 100644 --- a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts +++ b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) alias(ksp) } diff --git a/client/repository/appconfig/client-repository-appconfig.gradle.kts b/client/repository/appconfig/client-repository-appconfig.gradle.kts index b09e2cf914..e19a0a876e 100644 --- a/client/repository/appconfig/client-repository-appconfig.gradle.kts +++ b/client/repository/appconfig/client-repository-appconfig.gradle.kts @@ -4,7 +4,7 @@ import com.codingfeline.buildkonfig.gradle.BuildKonfigExtension plugins { libs.plugins.apply { - id(androidLib.get().pluginId) + alias(androidLibrary) alias(kotlinMultiplatform) id(buildKonfig.get().pluginId) alias(ksp) diff --git a/client/service/backend/client-service-backend.gradle.kts b/client/service/backend/client-service-backend.gradle.kts index 5b261d8e58..8a43a65ef6 100644 --- a/client/service/backend/client-service-backend.gradle.kts +++ b/client/service/backend/client-service-backend.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/storage/app/client-storage-app.gradle.kts b/client/storage/app/client-storage-app.gradle.kts index 3bb9507a21..48746877f3 100644 --- a/client/storage/app/client-storage-app.gradle.kts +++ b/client/storage/app/client-storage-app.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/storage/calculation/client-storage-calculation.gradle.kts b/client/storage/calculation/client-storage-calculation.gradle.kts index 8634b125aa..9b7ac0a5b2 100644 --- a/client/storage/calculation/client-storage-calculation.gradle.kts +++ b/client/storage/calculation/client-storage-calculation.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts index fa570e4922..6676d6e7a1 100644 --- a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts +++ b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts index d266d6986b..354ad3595a 100644 --- a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts +++ b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/main/client-viewmodel-main.gradle.kts b/client/viewmodel/main/client-viewmodel-main.gradle.kts index a3ed0c76cf..e59fe286c4 100644 --- a/client/viewmodel/main/client-viewmodel-main.gradle.kts +++ b/client/viewmodel/main/client-viewmodel-main.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts index 078aec83a1..4b9cd9fdb9 100644 --- a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts +++ b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts index 88a8500fcb..42d503b39b 100644 --- a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts +++ b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts index 9e163283ae..d82915fcb4 100644 --- a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts +++ b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts index af70bbf2ed..8beae2600f 100644 --- a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts +++ b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/common/core/database/common-core-database.gradle.kts b/common/core/database/common-core-database.gradle.kts index 32ead6ad2f..957c9f7f9f 100644 --- a/common/core/database/common-core-database.gradle.kts +++ b/common/core/database/common-core-database.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) id(sqlDelight.get().pluginId) } } diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index 90f8839b2b..2e9fca03c9 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -7,7 +7,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) id(kotlinXSerialization.get().pluginId) - id(androidLib.get().pluginId) + alias(androidLibrary) id(buildKonfig.get().pluginId) } } diff --git a/common/datasource/conversion/common-datasource-conversion.gradle.kts b/common/datasource/conversion/common-datasource-conversion.gradle.kts index 8a6bf8aa1e..5998bdd0f0 100644 --- a/common/datasource/conversion/common-datasource-conversion.gradle.kts +++ b/common/datasource/conversion/common-datasource-conversion.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(androidLib.get().pluginId) + alias(androidLibrary) alias(ksp) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 35e390f16b..f60d0cd312 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -138,7 +138,7 @@ kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } jvm = { id = "org.jetbrains.kotlin.jvm" } androidApp = { id = "com.android.application" } -androidLib = { id = "com.android.library" } +androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } safeArgs = { id = "androidx.navigation.safeargs" } buildKonfig = { id = "com.codingfeline.buildkonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } diff --git a/submodule/basemob b/submodule/basemob index 9cbc6c2ae6..00ca7ca94b 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 9cbc6c2ae6856eb1321afbaa5f8ccd6eccfa7bd4 +Subproject commit 00ca7ca94b91f03f5347e20e553706ec6285f72a diff --git a/submodule/logmob b/submodule/logmob index 543a97e834..ba257d1eaa 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 543a97e8340b878f25707d80c70b9d056691fdd7 +Subproject commit ba257d1eaaa0e3e0b0a7d24d1353e5f0f6e567f0 From 699264ccdf25ac034fc8d71df0af4bef389fa4b7 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 24 Oct 2023 15:00:25 +0200 Subject: [PATCH 31/81] [Oztechan/CCC#2901] Move org.jetbrains.kotlin.jvm to alias (#2902) --- CCC.gradle.kts | 1 + backend/app/backend-app.gradle.kts | 2 +- backend/controller/api/backend-controller-api.gradle.kts | 2 +- backend/controller/sync/backend-controller-sync.gradle.kts | 2 +- backend/service/premium/backend-service-premium.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- test/test.gradle.kts | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 9c7f03b579..813a333e4d 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -7,6 +7,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { libs.plugins.apply { alias(kotlinMultiplatform).apply(false) + alias(kotlinJvm).apply(false) alias(kotlinAndroid).apply(false) alias(androidLibrary).apply(false) alias(kover) diff --git a/backend/app/backend-app.gradle.kts b/backend/app/backend-app.gradle.kts index 8420c63787..43a32c0499 100644 --- a/backend/app/backend-app.gradle.kts +++ b/backend/app/backend-app.gradle.kts @@ -1,7 +1,7 @@ plugins { libs.plugins.apply { application - id(jvm.get().pluginId) + alias(kotlinJvm) alias(ksp) } } diff --git a/backend/controller/api/backend-controller-api.gradle.kts b/backend/controller/api/backend-controller-api.gradle.kts index c949a3e28d..e595d68877 100644 --- a/backend/controller/api/backend-controller-api.gradle.kts +++ b/backend/controller/api/backend-controller-api.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(jvm.get().pluginId) + alias(kotlinJvm) alias(ksp) } } diff --git a/backend/controller/sync/backend-controller-sync.gradle.kts b/backend/controller/sync/backend-controller-sync.gradle.kts index 76f808c47f..4b3a60c67c 100644 --- a/backend/controller/sync/backend-controller-sync.gradle.kts +++ b/backend/controller/sync/backend-controller-sync.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.jvm.get().pluginId) + alias(libs.plugins.kotlinJvm) } dependencies { diff --git a/backend/service/premium/backend-service-premium.gradle.kts b/backend/service/premium/backend-service-premium.gradle.kts index a2c90fde38..4d9b26fe23 100644 --- a/backend/service/premium/backend-service-premium.gradle.kts +++ b/backend/service/premium/backend-service-premium.gradle.kts @@ -1,6 +1,6 @@ plugins { libs.plugins.apply { - id(jvm.get().pluginId) + alias(kotlinJvm) alias(ksp) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f60d0cd312..231010b928 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -135,8 +135,8 @@ classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kove [plugins] kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -jvm = { id = "org.jetbrains.kotlin.jvm" } androidApp = { id = "com.android.application" } androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } safeArgs = { id = "androidx.navigation.safeargs" } diff --git a/test/test.gradle.kts b/test/test.gradle.kts index e1fc0b5864..21be7f97a1 100644 --- a/test/test.gradle.kts +++ b/test/test.gradle.kts @@ -1,5 +1,5 @@ plugins { - id(libs.plugins.jvm.get().pluginId) + alias(libs.plugins.kotlinJvm) } dependencies { From 18551e74daef46b6bf8e450333e3fea497b490c2 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 24 Oct 2023 19:28:21 +0200 Subject: [PATCH 32/81] [Oztechan/CCC#2899] Get rid of kotlinSerialization classpath (#2900) --- CCC.gradle.kts | 1 - client/core/remoteconfig/client-core-remoteconfig.gradle.kts | 4 ++-- common/core/network/common-core-network.gradle.kts | 2 +- gradle/libs.versions.toml | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 813a333e4d..4a3888feff 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -24,7 +24,6 @@ buildscript { classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done - classpath(kotlinSerialization) classpath(sqlDelight) classpath(mokoResources) classpath(buildKonfig) diff --git a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts index ba1a9411d9..4202a62e95 100644 --- a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts +++ b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts @@ -1,8 +1,8 @@ plugins { libs.plugins.apply { - alias(androidLibrary) alias(kotlinMultiplatform) - id(kotlinXSerialization.get().pluginId) + alias(androidLibrary) + alias(serialization) } } diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index 2e9fca03c9..b9447576d1 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -6,9 +6,9 @@ import config.key.secret plugins { libs.plugins.apply { alias(kotlinMultiplatform) - id(kotlinXSerialization.get().pluginId) alias(androidLibrary) id(buildKonfig.get().pluginId) + alias(serialization) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 231010b928..98fc442506 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -122,7 +122,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re # CLASSPATHS classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -classpaths-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" } classpaths-sqlDelight = { module = "com.squareup.sqldelight:gradle-plugin", version.ref = "sqlDelight" } classpaths-gsm = { module = "com.google.gms:google-services", version.ref = "gsm" } classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } @@ -144,9 +143,9 @@ buildKonfig = { id = "com.codingfeline.buildkonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } -kotlinXSerialization = { id = "kotlinx-serialization" } sqlDelight = { id = "com.squareup.sqldelight" } mokoResources = { id = "dev.icerock.mobile.multiplatform-resources" } +serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } From e2dd5b452719b6493086d21f76f57a84e82633fb Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Thu, 26 Oct 2023 11:28:37 +0200 Subject: [PATCH 33/81] [Oztechan/CCC#2906] Move com.android.application to alias (#2907) --- CCC.gradle.kts | 1 + android/app/android-app.gradle.kts | 2 +- gradle/libs.versions.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 4a3888feff..2d086f5102 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -9,6 +9,7 @@ plugins { alias(kotlinMultiplatform).apply(false) alias(kotlinJvm).apply(false) alias(kotlinAndroid).apply(false) + alias(androidApplication).apply(false) alias(androidLibrary).apply(false) alias(kover) alias(detekt) diff --git a/android/app/android-app.gradle.kts b/android/app/android-app.gradle.kts index 3dfa22d0a7..ee5ddce7fa 100644 --- a/android/app/android-app.gradle.kts +++ b/android/app/android-app.gradle.kts @@ -9,7 +9,7 @@ import config.key.secret plugins { libs.plugins.apply { - id(androidApp.get().pluginId) + alias(androidApplication) id(crashlytics.get().pluginId) id(googleServices.get().pluginId) id(firebasePerPlugin.get().pluginId) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 98fc442506..419e5fda67 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -136,7 +136,7 @@ classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kove kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -androidApp = { id = "com.android.application" } +androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" } androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } safeArgs = { id = "androidx.navigation.safeargs" } buildKonfig = { id = "com.codingfeline.buildkonfig" } From 3fe1f1655b1d4b82144c87678d5a3e38f34cfb50 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Thu, 26 Oct 2023 13:19:40 +0200 Subject: [PATCH 34/81] [Oztechan/CCC#2914] Get rid of gsm classpath (#2915) --- CCC.gradle.kts | 1 - android/app/android-app.gradle.kts | 2 +- gradle/libs.versions.toml | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 2d086f5102..3aac25fe88 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -21,7 +21,6 @@ buildscript { libs.classpaths.apply { classpath(androidGradlePlugin) classpath(kotlinGradlePlugin) - classpath(gsm) classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done diff --git a/android/app/android-app.gradle.kts b/android/app/android-app.gradle.kts index ee5ddce7fa..bd6759da75 100644 --- a/android/app/android-app.gradle.kts +++ b/android/app/android-app.gradle.kts @@ -11,9 +11,9 @@ plugins { libs.plugins.apply { alias(androidApplication) id(crashlytics.get().pluginId) - id(googleServices.get().pluginId) id(firebasePerPlugin.get().pluginId) alias(kotlinAndroid) + alias(googleServices) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 419e5fda67..496d71034c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ ktor = "2.3.4" multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" firebaseRemoteConfig = "21.5.0" -gsm = "4.4.0" +googleServices = "4.4.0" firebasePer = "20.4.1" firebasePerPlugin = "1.4.2" crashlytics = "2.9.9" @@ -123,7 +123,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } classpaths-sqlDelight = { module = "com.squareup.sqldelight:gradle-plugin", version.ref = "sqlDelight" } -classpaths-gsm = { module = "com.google.gms:google-services", version.ref = "gsm" } classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } @@ -141,7 +140,7 @@ androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugi safeArgs = { id = "androidx.navigation.safeargs" } buildKonfig = { id = "com.codingfeline.buildkonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } -googleServices = { id = "com.google.gms.google-services" } +googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } sqlDelight = { id = "com.squareup.sqldelight" } mokoResources = { id = "dev.icerock.mobile.multiplatform-resources" } From c5122541444e73fbcf04e20084b7261e7b6375c8 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Thu, 26 Oct 2023 17:24:12 +0200 Subject: [PATCH 35/81] [Oztechan/CCC#2922] Get rid of sqlDelight classpath (#2923) --- CCC.gradle.kts | 2 +- common/core/database/common-core-database.gradle.kts | 2 +- gradle/libs.versions.toml | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 3aac25fe88..9732053bf7 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(kotlinAndroid).apply(false) alias(androidApplication).apply(false) alias(androidLibrary).apply(false) + alias(sqlDelight).apply(false) alias(kover) alias(detekt) } @@ -24,7 +25,6 @@ buildscript { classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done - classpath(sqlDelight) classpath(mokoResources) classpath(buildKonfig) classpath(kover) diff --git a/common/core/database/common-core-database.gradle.kts b/common/core/database/common-core-database.gradle.kts index 957c9f7f9f..caa7827277 100644 --- a/common/core/database/common-core-database.gradle.kts +++ b/common/core/database/common-core-database.gradle.kts @@ -2,7 +2,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) alias(androidLibrary) - id(sqlDelight.get().pluginId) + alias(sqlDelight) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 496d71034c..5e55eb6c60 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,7 +26,7 @@ firebasePerPlugin = "1.4.2" crashlytics = "2.9.9" googleAds = "22.4.0" huaweiAds = "3.4.66.303" -huaweiOsm="1.3.35" +huaweiOsm = "1.3.35" navigation = "2.7.4" playCore = "1.10.3" kotlinXDateTime = "0.4.1" @@ -122,7 +122,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re # CLASSPATHS classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -classpaths-sqlDelight = { module = "com.squareup.sqldelight:gradle-plugin", version.ref = "sqlDelight" } classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } @@ -142,7 +141,7 @@ buildKonfig = { id = "com.codingfeline.buildkonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } -sqlDelight = { id = "com.squareup.sqldelight" } +sqlDelight = { id = "com.squareup.sqldelight", version.ref = "sqlDelight" } mokoResources = { id = "dev.icerock.mobile.multiplatform-resources" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } From 87e221329cb74f83452adf5d795f73c6a21986a0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 09:23:29 +0200 Subject: [PATCH 36/81] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-crashlytics-ktx to v18.5.1 (#2924) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5e55eb6c60..604132a558 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -41,7 +41,7 @@ splashScreen = "1.0.1" kover = "0.6.1" rootBeer = "0.1.0" mockative = "2.0.1" -firebaseCrashlytics = "18.5.0" +firebaseCrashlytics = "18.5.1" anrWatchDog = "1.4.0" kermit = "2.0.2" konsist = "0.11.0" From c542bd77a38c526c1078a93e455131b273fea3bd Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 27 Oct 2023 13:54:26 +0200 Subject: [PATCH 37/81] [Oztechan/CCC#2927] Add API testing cases (#2928) * [Oztechan/CCC#2927] Add API testing cases (cherry picked from commit 10dd0cb152e0d8ad6c90504dbd2c1572fffedd4c) * [Oztechan/CCC#2927] Add API testing cases * [Oztechan/CCC#2927] Add API testing cases --- .../network/common-core-network.gradle.kts | 1 + .../network/di/CommonCoreNetworkModule.kt | 5 + .../common/core/network/api/BackendApiTest.kt | 225 ++++++++++++++++++ .../common/core/network/api/PremiumApiTest.kt | 225 ++++++++++++++++++ .../ccc/common/core/network/fakes/Fakes.kt | 10 +- gradle/libs.versions.toml | 1 + 6 files changed, 462 insertions(+), 5 deletions(-) create mode 100644 common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/BackendApiTest.kt create mode 100644 common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/PremiumApiTest.kt diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index b9447576d1..ea3eb5d33d 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -43,6 +43,7 @@ kotlin { libs.common.apply { implementation(test) implementation(coroutinesTest) + implementation(ktorClientMock) } } } diff --git a/common/core/network/src/commonMain/kotlin/com/oztechan/ccc/common/core/network/di/CommonCoreNetworkModule.kt b/common/core/network/src/commonMain/kotlin/com/oztechan/ccc/common/core/network/di/CommonCoreNetworkModule.kt index a7f21d5c9b..a3eaf62648 100644 --- a/common/core/network/src/commonMain/kotlin/com/oztechan/ccc/common/core/network/di/CommonCoreNetworkModule.kt +++ b/common/core/network/src/commonMain/kotlin/com/oztechan/ccc/common/core/network/di/CommonCoreNetworkModule.kt @@ -5,6 +5,7 @@ import com.oztechan.ccc.common.core.network.api.backend.BackendApiImpl import com.oztechan.ccc.common.core.network.api.premium.PremiumApi import com.oztechan.ccc.common.core.network.api.premium.PremiumApiImpl import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig import io.ktor.client.plugins.HttpTimeout import io.ktor.client.plugins.contentnegotiation.ContentNegotiation import io.ktor.client.plugins.logging.LogLevel @@ -26,6 +27,10 @@ val commonCoreNetworkModule = module { } private fun provideHttpClient() = HttpClient { + setupHttpClientConfig() +} + +internal fun HttpClientConfig<*>.setupHttpClientConfig() { install(ContentNegotiation) { json( json = Json { diff --git a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/BackendApiTest.kt b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/BackendApiTest.kt new file mode 100644 index 0000000000..8ce95716fc --- /dev/null +++ b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/BackendApiTest.kt @@ -0,0 +1,225 @@ +package com.oztechan.ccc.common.core.network.api + +import com.oztechan.ccc.common.core.network.api.backend.BackendApi +import com.oztechan.ccc.common.core.network.api.backend.BackendApiImpl +import com.oztechan.ccc.common.core.network.di.setupHttpClientConfig +import com.oztechan.ccc.common.core.network.fakes.Fakes +import io.ktor.client.HttpClient +import io.ktor.client.engine.mock.MockEngine +import io.ktor.client.engine.mock.respond +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.headersOf +import io.ktor.utils.io.ByteReadChannel +import kotlinx.coroutines.test.runTest +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFails + +internal class BackendApiTest { + @Suppress("LongMethod") + @Test + fun getExchangeRateSuccess() = runTest { + val mockEngine = MockEngine { _ -> + respond( + content = ByteReadChannel(Json.encodeToString(Fakes.exchangeRate)), + status = HttpStatusCode.OK, + headers = headersOf(HttpHeaders.ContentType, "application/json") + ) + } + + val apiClient = BackendApiImpl( + HttpClient(mockEngine) { + setupHttpClientConfig() + } + ) as BackendApi + + apiClient.getExchangeRate(Fakes.BASE).apply { + assertEquals(Fakes.BASE, base) + assertEquals(Fakes.DATE, date) + assertEquals(Fakes.exchangeRate.base, conversion.base) + assertEquals(Fakes.exchangeRate.conversion.aed, conversion.aed) + assertEquals(Fakes.exchangeRate.conversion.afn, conversion.afn) + assertEquals(Fakes.exchangeRate.conversion.all, conversion.all) + assertEquals(Fakes.exchangeRate.conversion.amd, conversion.amd) + assertEquals(Fakes.exchangeRate.conversion.ang, conversion.ang) + assertEquals(Fakes.exchangeRate.conversion.aoa, conversion.aoa) + assertEquals(Fakes.exchangeRate.conversion.ars, conversion.ars) + assertEquals(Fakes.exchangeRate.conversion.aud, conversion.aud) + assertEquals(Fakes.exchangeRate.conversion.awg, conversion.awg) + assertEquals(Fakes.exchangeRate.conversion.azn, conversion.azn) + assertEquals(Fakes.exchangeRate.conversion.bam, conversion.bam) + assertEquals(Fakes.exchangeRate.conversion.bbd, conversion.bbd) + assertEquals(Fakes.exchangeRate.conversion.bdt, conversion.bdt) + assertEquals(Fakes.exchangeRate.conversion.bgn, conversion.bgn) + assertEquals(Fakes.exchangeRate.conversion.bhd, conversion.bhd) + assertEquals(Fakes.exchangeRate.conversion.bif, conversion.bif) + assertEquals(Fakes.exchangeRate.conversion.bmd, conversion.bmd) + assertEquals(Fakes.exchangeRate.conversion.bnd, conversion.bnd) + assertEquals(Fakes.exchangeRate.conversion.bob, conversion.bob) + assertEquals(Fakes.exchangeRate.conversion.brl, conversion.brl) + assertEquals(Fakes.exchangeRate.conversion.bsd, conversion.bsd) + assertEquals(Fakes.exchangeRate.conversion.btn, conversion.btn) + assertEquals(Fakes.exchangeRate.conversion.bwp, conversion.bwp) + assertEquals(Fakes.exchangeRate.conversion.byn, conversion.byn) + assertEquals(Fakes.exchangeRate.conversion.bzd, conversion.bzd) + assertEquals(Fakes.exchangeRate.conversion.cad, conversion.cad) + assertEquals(Fakes.exchangeRate.conversion.cdf, conversion.cdf) + assertEquals(Fakes.exchangeRate.conversion.chf, conversion.chf) + assertEquals(Fakes.exchangeRate.conversion.clp, conversion.clp) + assertEquals(Fakes.exchangeRate.conversion.cny, conversion.cny) + assertEquals(Fakes.exchangeRate.conversion.cop, conversion.cop) + assertEquals(Fakes.exchangeRate.conversion.crc, conversion.crc) + assertEquals(Fakes.exchangeRate.conversion.cup, conversion.cup) + assertEquals(Fakes.exchangeRate.conversion.cve, conversion.cve) + assertEquals(Fakes.exchangeRate.conversion.czk, conversion.czk) + assertEquals(Fakes.exchangeRate.conversion.djf, conversion.djf) + assertEquals(Fakes.exchangeRate.conversion.dkk, conversion.dkk) + assertEquals(Fakes.exchangeRate.conversion.dop, conversion.dop) + assertEquals(Fakes.exchangeRate.conversion.dzd, conversion.dzd) + assertEquals(Fakes.exchangeRate.conversion.egp, conversion.egp) + assertEquals(Fakes.exchangeRate.conversion.ern, conversion.ern) + assertEquals(Fakes.exchangeRate.conversion.etb, conversion.etb) + assertEquals(Fakes.exchangeRate.conversion.eur, conversion.eur) + assertEquals(Fakes.exchangeRate.conversion.fjd, conversion.fjd) + assertEquals(Fakes.exchangeRate.conversion.fkp, conversion.fkp) + assertEquals(Fakes.exchangeRate.conversion.fok, conversion.fok) + assertEquals(Fakes.exchangeRate.conversion.gbp, conversion.gbp) + assertEquals(Fakes.exchangeRate.conversion.gel, conversion.gel) + assertEquals(Fakes.exchangeRate.conversion.ggp, conversion.ggp) + assertEquals(Fakes.exchangeRate.conversion.ghs, conversion.ghs) + assertEquals(Fakes.exchangeRate.conversion.gip, conversion.gip) + assertEquals(Fakes.exchangeRate.conversion.gmd, conversion.gmd) + assertEquals(Fakes.exchangeRate.conversion.gnf, conversion.gnf) + assertEquals(Fakes.exchangeRate.conversion.gtq, conversion.gtq) + assertEquals(Fakes.exchangeRate.conversion.gyd, conversion.gyd) + assertEquals(Fakes.exchangeRate.conversion.hkd, conversion.hkd) + assertEquals(Fakes.exchangeRate.conversion.hnl, conversion.hnl) + assertEquals(Fakes.exchangeRate.conversion.hrk, conversion.hrk) + assertEquals(Fakes.exchangeRate.conversion.htg, conversion.htg) + assertEquals(Fakes.exchangeRate.conversion.huf, conversion.huf) + assertEquals(Fakes.exchangeRate.conversion.idr, conversion.idr) + assertEquals(Fakes.exchangeRate.conversion.ils, conversion.ils) + assertEquals(Fakes.exchangeRate.conversion.imp, conversion.imp) + assertEquals(Fakes.exchangeRate.conversion.inr, conversion.inr) + assertEquals(Fakes.exchangeRate.conversion.iqd, conversion.iqd) + assertEquals(Fakes.exchangeRate.conversion.irr, conversion.irr) + assertEquals(Fakes.exchangeRate.conversion.isk, conversion.isk) + assertEquals(Fakes.exchangeRate.conversion.jep, conversion.jep) + assertEquals(Fakes.exchangeRate.conversion.jmd, conversion.jmd) + assertEquals(Fakes.exchangeRate.conversion.jod, conversion.jod) + assertEquals(Fakes.exchangeRate.conversion.jpy, conversion.jpy) + assertEquals(Fakes.exchangeRate.conversion.kes, conversion.kes) + assertEquals(Fakes.exchangeRate.conversion.kgs, conversion.kgs) + assertEquals(Fakes.exchangeRate.conversion.khr, conversion.khr) + assertEquals(Fakes.exchangeRate.conversion.kid, conversion.kid) + assertEquals(Fakes.exchangeRate.conversion.kmf, conversion.kmf) + assertEquals(Fakes.exchangeRate.conversion.krw, conversion.krw) + assertEquals(Fakes.exchangeRate.conversion.kwd, conversion.kwd) + assertEquals(Fakes.exchangeRate.conversion.kyd, conversion.kyd) + assertEquals(Fakes.exchangeRate.conversion.kzt, conversion.kzt) + assertEquals(Fakes.exchangeRate.conversion.lak, conversion.lak) + assertEquals(Fakes.exchangeRate.conversion.lbp, conversion.lbp) + assertEquals(Fakes.exchangeRate.conversion.lkr, conversion.lkr) + assertEquals(Fakes.exchangeRate.conversion.lrd, conversion.lrd) + assertEquals(Fakes.exchangeRate.conversion.lsl, conversion.lsl) + assertEquals(Fakes.exchangeRate.conversion.lyd, conversion.lyd) + assertEquals(Fakes.exchangeRate.conversion.mad, conversion.mad) + assertEquals(Fakes.exchangeRate.conversion.mdl, conversion.mdl) + assertEquals(Fakes.exchangeRate.conversion.mga, conversion.mga) + assertEquals(Fakes.exchangeRate.conversion.mkd, conversion.mkd) + assertEquals(Fakes.exchangeRate.conversion.mmk, conversion.mmk) + assertEquals(Fakes.exchangeRate.conversion.mnt, conversion.mnt) + assertEquals(Fakes.exchangeRate.conversion.mop, conversion.mop) + assertEquals(Fakes.exchangeRate.conversion.mru, conversion.mru) + assertEquals(Fakes.exchangeRate.conversion.mur, conversion.mur) + assertEquals(Fakes.exchangeRate.conversion.mvr, conversion.mvr) + assertEquals(Fakes.exchangeRate.conversion.mwk, conversion.mwk) + assertEquals(Fakes.exchangeRate.conversion.mxn, conversion.mxn) + assertEquals(Fakes.exchangeRate.conversion.myr, conversion.myr) + assertEquals(Fakes.exchangeRate.conversion.mzn, conversion.mzn) + assertEquals(Fakes.exchangeRate.conversion.nad, conversion.nad) + assertEquals(Fakes.exchangeRate.conversion.ngn, conversion.ngn) + assertEquals(Fakes.exchangeRate.conversion.nio, conversion.nio) + assertEquals(Fakes.exchangeRate.conversion.nok, conversion.nok) + assertEquals(Fakes.exchangeRate.conversion.npr, conversion.npr) + assertEquals(Fakes.exchangeRate.conversion.nzd, conversion.nzd) + assertEquals(Fakes.exchangeRate.conversion.omr, conversion.omr) + assertEquals(Fakes.exchangeRate.conversion.pab, conversion.pab) + assertEquals(Fakes.exchangeRate.conversion.pen, conversion.pen) + assertEquals(Fakes.exchangeRate.conversion.pgk, conversion.pgk) + assertEquals(Fakes.exchangeRate.conversion.php, conversion.php) + assertEquals(Fakes.exchangeRate.conversion.pkr, conversion.pkr) + assertEquals(Fakes.exchangeRate.conversion.pln, conversion.pln) + assertEquals(Fakes.exchangeRate.conversion.pyg, conversion.pyg) + assertEquals(Fakes.exchangeRate.conversion.qar, conversion.qar) + assertEquals(Fakes.exchangeRate.conversion.ron, conversion.ron) + assertEquals(Fakes.exchangeRate.conversion.rsd, conversion.rsd) + assertEquals(Fakes.exchangeRate.conversion.rub, conversion.rub) + assertEquals(Fakes.exchangeRate.conversion.rwf, conversion.rwf) + assertEquals(Fakes.exchangeRate.conversion.sar, conversion.sar) + assertEquals(Fakes.exchangeRate.conversion.sbd, conversion.sbd) + assertEquals(Fakes.exchangeRate.conversion.scr, conversion.scr) + assertEquals(Fakes.exchangeRate.conversion.sdg, conversion.sdg) + assertEquals(Fakes.exchangeRate.conversion.sek, conversion.sek) + assertEquals(Fakes.exchangeRate.conversion.sgd, conversion.sgd) + assertEquals(Fakes.exchangeRate.conversion.shp, conversion.shp) + assertEquals(Fakes.exchangeRate.conversion.sle, conversion.sle) + assertEquals(Fakes.exchangeRate.conversion.sll, conversion.sll) + assertEquals(Fakes.exchangeRate.conversion.sos, conversion.sos) + assertEquals(Fakes.exchangeRate.conversion.srd, conversion.srd) + assertEquals(Fakes.exchangeRate.conversion.ssp, conversion.ssp) + assertEquals(Fakes.exchangeRate.conversion.stn, conversion.stn) + assertEquals(Fakes.exchangeRate.conversion.syp, conversion.syp) + assertEquals(Fakes.exchangeRate.conversion.szl, conversion.szl) + assertEquals(Fakes.exchangeRate.conversion.thb, conversion.thb) + assertEquals(Fakes.exchangeRate.conversion.tjs, conversion.tjs) + assertEquals(Fakes.exchangeRate.conversion.tmt, conversion.tmt) + assertEquals(Fakes.exchangeRate.conversion.tnd, conversion.tnd) + assertEquals(Fakes.exchangeRate.conversion.top, conversion.top) + assertEquals(Fakes.exchangeRate.conversion.`try`, conversion.`try`) + assertEquals(Fakes.exchangeRate.conversion.ttd, conversion.ttd) + assertEquals(Fakes.exchangeRate.conversion.tvd, conversion.tvd) + assertEquals(Fakes.exchangeRate.conversion.twd, conversion.twd) + assertEquals(Fakes.exchangeRate.conversion.tzs, conversion.tzs) + assertEquals(Fakes.exchangeRate.conversion.uah, conversion.uah) + assertEquals(Fakes.exchangeRate.conversion.ugx, conversion.ugx) + assertEquals(Fakes.exchangeRate.conversion.usd, conversion.usd) + assertEquals(Fakes.exchangeRate.conversion.uyu, conversion.uyu) + assertEquals(Fakes.exchangeRate.conversion.uzs, conversion.uzs) + assertEquals(Fakes.exchangeRate.conversion.ves, conversion.ves) + assertEquals(Fakes.exchangeRate.conversion.vnd, conversion.vnd) + assertEquals(Fakes.exchangeRate.conversion.vuv, conversion.vuv) + assertEquals(Fakes.exchangeRate.conversion.wst, conversion.wst) + assertEquals(Fakes.exchangeRate.conversion.xaf, conversion.xaf) + assertEquals(Fakes.exchangeRate.conversion.xcd, conversion.xcd) + assertEquals(Fakes.exchangeRate.conversion.xdr, conversion.xdr) + assertEquals(Fakes.exchangeRate.conversion.xof, conversion.xof) + assertEquals(Fakes.exchangeRate.conversion.xpf, conversion.xpf) + assertEquals(Fakes.exchangeRate.conversion.yer, conversion.yer) + assertEquals(Fakes.exchangeRate.conversion.zar, conversion.zar) + assertEquals(Fakes.exchangeRate.conversion.zmw, conversion.zmw) + assertEquals(Fakes.exchangeRate.conversion.zwl, conversion.zwl) + } + } + + @Test + fun getExchangeRateBadRequest() = runTest { + val mockEngine = MockEngine { _ -> + respond( + content = "", + status = HttpStatusCode.BadRequest + ) + } + + val apiClient = BackendApiImpl( + HttpClient(mockEngine) { + setupHttpClientConfig() + } + ) as BackendApi + + assertFails { apiClient.getExchangeRate("EUR") } + } +} diff --git a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/PremiumApiTest.kt b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/PremiumApiTest.kt new file mode 100644 index 0000000000..b63d77df31 --- /dev/null +++ b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/api/PremiumApiTest.kt @@ -0,0 +1,225 @@ +package com.oztechan.ccc.common.core.network.api + +import com.oztechan.ccc.common.core.network.api.premium.PremiumApi +import com.oztechan.ccc.common.core.network.api.premium.PremiumApiImpl +import com.oztechan.ccc.common.core.network.di.setupHttpClientConfig +import com.oztechan.ccc.common.core.network.fakes.Fakes +import io.ktor.client.HttpClient +import io.ktor.client.engine.mock.MockEngine +import io.ktor.client.engine.mock.respond +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.headersOf +import io.ktor.utils.io.ByteReadChannel +import kotlinx.coroutines.test.runTest +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFails + +internal class PremiumApiTest { + @Suppress("LongMethod") + @Test + fun getExchangeRateSuccess() = runTest { + val mockEngine = MockEngine { _ -> + respond( + content = ByteReadChannel(Json.encodeToString(Fakes.exchangeRate)), + status = HttpStatusCode.OK, + headers = headersOf(HttpHeaders.ContentType, "application/json") + ) + } + + val apiClient = PremiumApiImpl( + HttpClient(mockEngine) { + setupHttpClientConfig() + } + ) as PremiumApi + + apiClient.getExchangeRate(Fakes.BASE).apply { + assertEquals(Fakes.BASE, base) + assertEquals(Fakes.DATE, date) + assertEquals(Fakes.exchangeRate.base, conversion.base) + assertEquals(Fakes.exchangeRate.conversion.aed, conversion.aed) + assertEquals(Fakes.exchangeRate.conversion.afn, conversion.afn) + assertEquals(Fakes.exchangeRate.conversion.all, conversion.all) + assertEquals(Fakes.exchangeRate.conversion.amd, conversion.amd) + assertEquals(Fakes.exchangeRate.conversion.ang, conversion.ang) + assertEquals(Fakes.exchangeRate.conversion.aoa, conversion.aoa) + assertEquals(Fakes.exchangeRate.conversion.ars, conversion.ars) + assertEquals(Fakes.exchangeRate.conversion.aud, conversion.aud) + assertEquals(Fakes.exchangeRate.conversion.awg, conversion.awg) + assertEquals(Fakes.exchangeRate.conversion.azn, conversion.azn) + assertEquals(Fakes.exchangeRate.conversion.bam, conversion.bam) + assertEquals(Fakes.exchangeRate.conversion.bbd, conversion.bbd) + assertEquals(Fakes.exchangeRate.conversion.bdt, conversion.bdt) + assertEquals(Fakes.exchangeRate.conversion.bgn, conversion.bgn) + assertEquals(Fakes.exchangeRate.conversion.bhd, conversion.bhd) + assertEquals(Fakes.exchangeRate.conversion.bif, conversion.bif) + assertEquals(Fakes.exchangeRate.conversion.bmd, conversion.bmd) + assertEquals(Fakes.exchangeRate.conversion.bnd, conversion.bnd) + assertEquals(Fakes.exchangeRate.conversion.bob, conversion.bob) + assertEquals(Fakes.exchangeRate.conversion.brl, conversion.brl) + assertEquals(Fakes.exchangeRate.conversion.bsd, conversion.bsd) + assertEquals(Fakes.exchangeRate.conversion.btn, conversion.btn) + assertEquals(Fakes.exchangeRate.conversion.bwp, conversion.bwp) + assertEquals(Fakes.exchangeRate.conversion.byn, conversion.byn) + assertEquals(Fakes.exchangeRate.conversion.bzd, conversion.bzd) + assertEquals(Fakes.exchangeRate.conversion.cad, conversion.cad) + assertEquals(Fakes.exchangeRate.conversion.cdf, conversion.cdf) + assertEquals(Fakes.exchangeRate.conversion.chf, conversion.chf) + assertEquals(Fakes.exchangeRate.conversion.clp, conversion.clp) + assertEquals(Fakes.exchangeRate.conversion.cny, conversion.cny) + assertEquals(Fakes.exchangeRate.conversion.cop, conversion.cop) + assertEquals(Fakes.exchangeRate.conversion.crc, conversion.crc) + assertEquals(Fakes.exchangeRate.conversion.cup, conversion.cup) + assertEquals(Fakes.exchangeRate.conversion.cve, conversion.cve) + assertEquals(Fakes.exchangeRate.conversion.czk, conversion.czk) + assertEquals(Fakes.exchangeRate.conversion.djf, conversion.djf) + assertEquals(Fakes.exchangeRate.conversion.dkk, conversion.dkk) + assertEquals(Fakes.exchangeRate.conversion.dop, conversion.dop) + assertEquals(Fakes.exchangeRate.conversion.dzd, conversion.dzd) + assertEquals(Fakes.exchangeRate.conversion.egp, conversion.egp) + assertEquals(Fakes.exchangeRate.conversion.ern, conversion.ern) + assertEquals(Fakes.exchangeRate.conversion.etb, conversion.etb) + assertEquals(Fakes.exchangeRate.conversion.eur, conversion.eur) + assertEquals(Fakes.exchangeRate.conversion.fjd, conversion.fjd) + assertEquals(Fakes.exchangeRate.conversion.fkp, conversion.fkp) + assertEquals(Fakes.exchangeRate.conversion.fok, conversion.fok) + assertEquals(Fakes.exchangeRate.conversion.gbp, conversion.gbp) + assertEquals(Fakes.exchangeRate.conversion.gel, conversion.gel) + assertEquals(Fakes.exchangeRate.conversion.ggp, conversion.ggp) + assertEquals(Fakes.exchangeRate.conversion.ghs, conversion.ghs) + assertEquals(Fakes.exchangeRate.conversion.gip, conversion.gip) + assertEquals(Fakes.exchangeRate.conversion.gmd, conversion.gmd) + assertEquals(Fakes.exchangeRate.conversion.gnf, conversion.gnf) + assertEquals(Fakes.exchangeRate.conversion.gtq, conversion.gtq) + assertEquals(Fakes.exchangeRate.conversion.gyd, conversion.gyd) + assertEquals(Fakes.exchangeRate.conversion.hkd, conversion.hkd) + assertEquals(Fakes.exchangeRate.conversion.hnl, conversion.hnl) + assertEquals(Fakes.exchangeRate.conversion.hrk, conversion.hrk) + assertEquals(Fakes.exchangeRate.conversion.htg, conversion.htg) + assertEquals(Fakes.exchangeRate.conversion.huf, conversion.huf) + assertEquals(Fakes.exchangeRate.conversion.idr, conversion.idr) + assertEquals(Fakes.exchangeRate.conversion.ils, conversion.ils) + assertEquals(Fakes.exchangeRate.conversion.imp, conversion.imp) + assertEquals(Fakes.exchangeRate.conversion.inr, conversion.inr) + assertEquals(Fakes.exchangeRate.conversion.iqd, conversion.iqd) + assertEquals(Fakes.exchangeRate.conversion.irr, conversion.irr) + assertEquals(Fakes.exchangeRate.conversion.isk, conversion.isk) + assertEquals(Fakes.exchangeRate.conversion.jep, conversion.jep) + assertEquals(Fakes.exchangeRate.conversion.jmd, conversion.jmd) + assertEquals(Fakes.exchangeRate.conversion.jod, conversion.jod) + assertEquals(Fakes.exchangeRate.conversion.jpy, conversion.jpy) + assertEquals(Fakes.exchangeRate.conversion.kes, conversion.kes) + assertEquals(Fakes.exchangeRate.conversion.kgs, conversion.kgs) + assertEquals(Fakes.exchangeRate.conversion.khr, conversion.khr) + assertEquals(Fakes.exchangeRate.conversion.kid, conversion.kid) + assertEquals(Fakes.exchangeRate.conversion.kmf, conversion.kmf) + assertEquals(Fakes.exchangeRate.conversion.krw, conversion.krw) + assertEquals(Fakes.exchangeRate.conversion.kwd, conversion.kwd) + assertEquals(Fakes.exchangeRate.conversion.kyd, conversion.kyd) + assertEquals(Fakes.exchangeRate.conversion.kzt, conversion.kzt) + assertEquals(Fakes.exchangeRate.conversion.lak, conversion.lak) + assertEquals(Fakes.exchangeRate.conversion.lbp, conversion.lbp) + assertEquals(Fakes.exchangeRate.conversion.lkr, conversion.lkr) + assertEquals(Fakes.exchangeRate.conversion.lrd, conversion.lrd) + assertEquals(Fakes.exchangeRate.conversion.lsl, conversion.lsl) + assertEquals(Fakes.exchangeRate.conversion.lyd, conversion.lyd) + assertEquals(Fakes.exchangeRate.conversion.mad, conversion.mad) + assertEquals(Fakes.exchangeRate.conversion.mdl, conversion.mdl) + assertEquals(Fakes.exchangeRate.conversion.mga, conversion.mga) + assertEquals(Fakes.exchangeRate.conversion.mkd, conversion.mkd) + assertEquals(Fakes.exchangeRate.conversion.mmk, conversion.mmk) + assertEquals(Fakes.exchangeRate.conversion.mnt, conversion.mnt) + assertEquals(Fakes.exchangeRate.conversion.mop, conversion.mop) + assertEquals(Fakes.exchangeRate.conversion.mru, conversion.mru) + assertEquals(Fakes.exchangeRate.conversion.mur, conversion.mur) + assertEquals(Fakes.exchangeRate.conversion.mvr, conversion.mvr) + assertEquals(Fakes.exchangeRate.conversion.mwk, conversion.mwk) + assertEquals(Fakes.exchangeRate.conversion.mxn, conversion.mxn) + assertEquals(Fakes.exchangeRate.conversion.myr, conversion.myr) + assertEquals(Fakes.exchangeRate.conversion.mzn, conversion.mzn) + assertEquals(Fakes.exchangeRate.conversion.nad, conversion.nad) + assertEquals(Fakes.exchangeRate.conversion.ngn, conversion.ngn) + assertEquals(Fakes.exchangeRate.conversion.nio, conversion.nio) + assertEquals(Fakes.exchangeRate.conversion.nok, conversion.nok) + assertEquals(Fakes.exchangeRate.conversion.npr, conversion.npr) + assertEquals(Fakes.exchangeRate.conversion.nzd, conversion.nzd) + assertEquals(Fakes.exchangeRate.conversion.omr, conversion.omr) + assertEquals(Fakes.exchangeRate.conversion.pab, conversion.pab) + assertEquals(Fakes.exchangeRate.conversion.pen, conversion.pen) + assertEquals(Fakes.exchangeRate.conversion.pgk, conversion.pgk) + assertEquals(Fakes.exchangeRate.conversion.php, conversion.php) + assertEquals(Fakes.exchangeRate.conversion.pkr, conversion.pkr) + assertEquals(Fakes.exchangeRate.conversion.pln, conversion.pln) + assertEquals(Fakes.exchangeRate.conversion.pyg, conversion.pyg) + assertEquals(Fakes.exchangeRate.conversion.qar, conversion.qar) + assertEquals(Fakes.exchangeRate.conversion.ron, conversion.ron) + assertEquals(Fakes.exchangeRate.conversion.rsd, conversion.rsd) + assertEquals(Fakes.exchangeRate.conversion.rub, conversion.rub) + assertEquals(Fakes.exchangeRate.conversion.rwf, conversion.rwf) + assertEquals(Fakes.exchangeRate.conversion.sar, conversion.sar) + assertEquals(Fakes.exchangeRate.conversion.sbd, conversion.sbd) + assertEquals(Fakes.exchangeRate.conversion.scr, conversion.scr) + assertEquals(Fakes.exchangeRate.conversion.sdg, conversion.sdg) + assertEquals(Fakes.exchangeRate.conversion.sek, conversion.sek) + assertEquals(Fakes.exchangeRate.conversion.sgd, conversion.sgd) + assertEquals(Fakes.exchangeRate.conversion.shp, conversion.shp) + assertEquals(Fakes.exchangeRate.conversion.sle, conversion.sle) + assertEquals(Fakes.exchangeRate.conversion.sll, conversion.sll) + assertEquals(Fakes.exchangeRate.conversion.sos, conversion.sos) + assertEquals(Fakes.exchangeRate.conversion.srd, conversion.srd) + assertEquals(Fakes.exchangeRate.conversion.ssp, conversion.ssp) + assertEquals(Fakes.exchangeRate.conversion.stn, conversion.stn) + assertEquals(Fakes.exchangeRate.conversion.syp, conversion.syp) + assertEquals(Fakes.exchangeRate.conversion.szl, conversion.szl) + assertEquals(Fakes.exchangeRate.conversion.thb, conversion.thb) + assertEquals(Fakes.exchangeRate.conversion.tjs, conversion.tjs) + assertEquals(Fakes.exchangeRate.conversion.tmt, conversion.tmt) + assertEquals(Fakes.exchangeRate.conversion.tnd, conversion.tnd) + assertEquals(Fakes.exchangeRate.conversion.top, conversion.top) + assertEquals(Fakes.exchangeRate.conversion.`try`, conversion.`try`) + assertEquals(Fakes.exchangeRate.conversion.ttd, conversion.ttd) + assertEquals(Fakes.exchangeRate.conversion.tvd, conversion.tvd) + assertEquals(Fakes.exchangeRate.conversion.twd, conversion.twd) + assertEquals(Fakes.exchangeRate.conversion.tzs, conversion.tzs) + assertEquals(Fakes.exchangeRate.conversion.uah, conversion.uah) + assertEquals(Fakes.exchangeRate.conversion.ugx, conversion.ugx) + assertEquals(Fakes.exchangeRate.conversion.usd, conversion.usd) + assertEquals(Fakes.exchangeRate.conversion.uyu, conversion.uyu) + assertEquals(Fakes.exchangeRate.conversion.uzs, conversion.uzs) + assertEquals(Fakes.exchangeRate.conversion.ves, conversion.ves) + assertEquals(Fakes.exchangeRate.conversion.vnd, conversion.vnd) + assertEquals(Fakes.exchangeRate.conversion.vuv, conversion.vuv) + assertEquals(Fakes.exchangeRate.conversion.wst, conversion.wst) + assertEquals(Fakes.exchangeRate.conversion.xaf, conversion.xaf) + assertEquals(Fakes.exchangeRate.conversion.xcd, conversion.xcd) + assertEquals(Fakes.exchangeRate.conversion.xdr, conversion.xdr) + assertEquals(Fakes.exchangeRate.conversion.xof, conversion.xof) + assertEquals(Fakes.exchangeRate.conversion.xpf, conversion.xpf) + assertEquals(Fakes.exchangeRate.conversion.yer, conversion.yer) + assertEquals(Fakes.exchangeRate.conversion.zar, conversion.zar) + assertEquals(Fakes.exchangeRate.conversion.zmw, conversion.zmw) + assertEquals(Fakes.exchangeRate.conversion.zwl, conversion.zwl) + } + } + + @Test + fun getExchangeRateBadRequest() = runTest { + val mockEngine = MockEngine { _ -> + respond( + content = "", + status = HttpStatusCode.BadRequest + ) + } + + val apiClient = PremiumApiImpl( + HttpClient(mockEngine) { + setupHttpClientConfig() + } + ) as PremiumApi + + assertFails { apiClient.getExchangeRate("EUR") } + } +} diff --git a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/fakes/Fakes.kt b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/fakes/Fakes.kt index 4e3dd6b69f..0c9c70e6ec 100644 --- a/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/fakes/Fakes.kt +++ b/common/core/network/src/commonTest/kotlin/com/oztechan/ccc/common/core/network/fakes/Fakes.kt @@ -4,14 +4,14 @@ import com.oztechan.ccc.common.core.network.model.Conversion import com.oztechan.ccc.common.core.network.model.ExchangeRate object Fakes { - private const val base = "EUR" - private const val date = "12.12.2022" + internal const val BASE = "EUR" + internal const val DATE = "12.12.2022" val exchangeRate = ExchangeRate( - base, - date, + BASE, + DATE, Conversion( - "", // not returned from API + BASE, "", // not returned from API 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 604132a558..97b8ea425e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -57,6 +57,7 @@ common-kotlinXDateTime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", ve common-ktorLogging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } common-ktorJson = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } common-ktorClientContentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } +common-ktorClientMock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" } common-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } common-coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } common-sqlDelightCoroutinesExt = { module = "com.squareup.sqldelight:coroutines-extensions", version.ref = "sqlDelight" } From 18e10ced04779ab71a92010c0e357df0993bffa5 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 27 Oct 2023 14:29:50 +0200 Subject: [PATCH 38/81] [Oztechan/CCC#2916] Get rid of kover classpath (#2917) --- CCC.gradle.kts | 1 - gradle/libs.versions.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 9732053bf7..5ed358322e 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -27,7 +27,6 @@ buildscript { classpath(navigation) // todo can be removed once compose migration done classpath(mokoResources) classpath(buildKonfig) - classpath(kover) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 97b8ea425e..e73400ad52 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -128,7 +128,6 @@ classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gr classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } classpaths-mokoResources = { module = "dev.icerock.moko:resources-generator", version.ref = "mokoResources" } classpaths-buildKonfig = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } -classpaths-kover = { module = "org.jetbrains.kotlinx:kover", version.ref = "kover" } [plugins] From 3a3f348bea9fa2dd0fbbd17f4034d7a4093cd5ca Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 10:44:07 +0200 Subject: [PATCH 39/81] [Oztechan/CCC#2918] Get rid of mokoResources classpath (#2919) --- CCC.gradle.kts | 1 - client/core/res/client-core-res.gradle.kts | 2 +- gradle/libs.versions.toml | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 5ed358322e..518afc19f3 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -25,7 +25,6 @@ buildscript { classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done - classpath(mokoResources) classpath(buildKonfig) } } diff --git a/client/core/res/client-core-res.gradle.kts b/client/core/res/client-core-res.gradle.kts index bff34243af..419e1b2276 100644 --- a/client/core/res/client-core-res.gradle.kts +++ b/client/core/res/client-core-res.gradle.kts @@ -4,7 +4,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) alias(androidLibrary) - id(mokoResources.get().pluginId) + alias(mokoResources) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e73400ad52..53bb63dff8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -126,7 +126,6 @@ classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-p classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } -classpaths-mokoResources = { module = "dev.icerock.moko:resources-generator", version.ref = "mokoResources" } classpaths-buildKonfig = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } [plugins] @@ -142,7 +141,7 @@ crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } sqlDelight = { id = "com.squareup.sqldelight", version.ref = "sqlDelight" } -mokoResources = { id = "dev.icerock.mobile.multiplatform-resources" } +mokoResources = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "mokoResources" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } From d29f3cd1cabe21c9352a8e632644397834c318df Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 11:49:31 +0200 Subject: [PATCH 40/81] [Oztechan/CCC#2912] Get rid of buildKonfig classpath (#2913) --- CCC.gradle.kts | 2 +- common/core/network/common-core-network.gradle.kts | 2 +- gradle/libs.versions.toml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 518afc19f3..c698faed49 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -11,6 +11,7 @@ plugins { alias(kotlinAndroid).apply(false) alias(androidApplication).apply(false) alias(androidLibrary).apply(false) + alias(buildKonfig).apply(false) alias(sqlDelight).apply(false) alias(kover) alias(detekt) @@ -25,7 +26,6 @@ buildscript { classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done - classpath(buildKonfig) } } } diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index ea3eb5d33d..2285184fc5 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -7,7 +7,7 @@ plugins { libs.plugins.apply { alias(kotlinMultiplatform) alias(androidLibrary) - id(buildKonfig.get().pluginId) + alias(buildKonfig) alias(serialization) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 53bb63dff8..a48e3cc5c7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -126,7 +126,6 @@ classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-p classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } -classpaths-buildKonfig = { module = "com.codingfeline.buildkonfig:buildkonfig-gradle-plugin", version.ref = "buildKonfig" } [plugins] @@ -136,7 +135,7 @@ kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" } androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } safeArgs = { id = "androidx.navigation.safeargs" } -buildKonfig = { id = "com.codingfeline.buildkonfig" } +buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } From 2805013dba83ca7457db30170c55efcd4dee7b55 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 12:37:58 +0200 Subject: [PATCH 41/81] [Oztechan/CCC#2929] Get rid of firebasePerPlugin classpath (#2930) * [Oztechan/CCC#2929] Get rid of firebasePerPlugin classpath (cherry picked from commit 5d288afcd5e522aa7dca9843ad2d84b48c509366) * [Oztechan/CCC#2925] Get rid of crashlytics classpath --- CCC.gradle.kts | 1 - android/app/android-app.gradle.kts | 2 +- gradle/libs.versions.toml | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index c698faed49..d5654388ef 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -23,7 +23,6 @@ buildscript { libs.classpaths.apply { classpath(androidGradlePlugin) classpath(kotlinGradlePlugin) - classpath(firebasePerPlugin) classpath(crashlytics) classpath(navigation) // todo can be removed once compose migration done } diff --git a/android/app/android-app.gradle.kts b/android/app/android-app.gradle.kts index bd6759da75..2f584f04d6 100644 --- a/android/app/android-app.gradle.kts +++ b/android/app/android-app.gradle.kts @@ -11,9 +11,9 @@ plugins { libs.plugins.apply { alias(androidApplication) id(crashlytics.get().pluginId) - id(firebasePerPlugin.get().pluginId) alias(kotlinAndroid) alias(googleServices) + alias(firebasePerPlugin) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a48e3cc5c7..0dbf4d3fba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -123,7 +123,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re # CLASSPATHS classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -classpaths-firebasePerPlugin = { module = "com.google.firebase:perf-plugin", version.ref = "firebasePerPlugin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } @@ -138,7 +137,7 @@ safeArgs = { id = "androidx.navigation.safeargs" } buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } -firebasePerPlugin = { id = "com.google.firebase.firebase-perf" } +firebasePerPlugin = { id = "com.google.firebase.firebase-perf", version.ref = "firebasePerPlugin" } sqlDelight = { id = "com.squareup.sqldelight", version.ref = "sqlDelight" } mokoResources = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "mokoResources" } serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } From 8c6eed2234ee837fbce6460e87481e35f832e770 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 12:38:32 +0200 Subject: [PATCH 42/81] [Oztechan/CCC#2920] Get rid of safeArgs classpath (#2921) --- CCC.gradle.kts | 1 - android/ui/mobile/android-ui-mobile.gradle.kts | 2 +- gradle/libs.versions.toml | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index d5654388ef..35a806c865 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -24,7 +24,6 @@ buildscript { classpath(androidGradlePlugin) classpath(kotlinGradlePlugin) classpath(crashlytics) - classpath(navigation) // todo can be removed once compose migration done } } } diff --git a/android/ui/mobile/android-ui-mobile.gradle.kts b/android/ui/mobile/android-ui-mobile.gradle.kts index 9c2bf1632b..3d1ebfe5a1 100644 --- a/android/ui/mobile/android-ui-mobile.gradle.kts +++ b/android/ui/mobile/android-ui-mobile.gradle.kts @@ -5,7 +5,7 @@ plugins { libs.plugins.apply { alias(androidLibrary) alias(kotlinAndroid) - id(safeArgs.get().pluginId) // todo can be removed once compose migration done + alias(safeArgs) // todo can be removed once compose migration done } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0dbf4d3fba..e42df5af99 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -124,7 +124,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } -classpaths-navigation = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation" } [plugins] @@ -133,7 +132,7 @@ kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" } androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } -safeArgs = { id = "androidx.navigation.safeargs" } +safeArgs = { id = "androidx.navigation.safeargs", version.ref = "navigation" } buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" } crashlytics = { id = "com.google.firebase.crashlytics" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } From da56ccc3c0aaa404605e1e24522459b8af0e3fec Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 12:39:53 +0200 Subject: [PATCH 43/81] [Oztechan/CCC#2925] Get rid of crashlytics classpath (#2926) * [Oztechan/CCC#2925] Get rid of crashlytics classpath * [Oztechan/CCC#2925] Get rid of crashlytics classpath --- CCC.gradle.kts | 1 - android/app/android-app.gradle.kts | 2 +- gradle/libs.versions.toml | 7 ++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 35a806c865..cb3cea4b99 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -23,7 +23,6 @@ buildscript { libs.classpaths.apply { classpath(androidGradlePlugin) classpath(kotlinGradlePlugin) - classpath(crashlytics) } } } diff --git a/android/app/android-app.gradle.kts b/android/app/android-app.gradle.kts index 2f584f04d6..176d957cbb 100644 --- a/android/app/android-app.gradle.kts +++ b/android/app/android-app.gradle.kts @@ -10,10 +10,10 @@ import config.key.secret plugins { libs.plugins.apply { alias(androidApplication) - id(crashlytics.get().pluginId) alias(kotlinAndroid) alias(googleServices) alias(firebasePerPlugin) + alias(firebaseCrashlyticsPlugin) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e42df5af99..a601a94af5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,7 +23,7 @@ firebaseRemoteConfig = "21.5.0" googleServices = "4.4.0" firebasePer = "20.4.1" firebasePerPlugin = "1.4.2" -crashlytics = "2.9.9" +firebaseCrashlyticsPlugin = "2.9.9" googleAds = "22.4.0" huaweiAds = "3.4.66.303" huaweiOsm = "1.3.35" @@ -41,7 +41,6 @@ splashScreen = "1.0.1" kover = "0.6.1" rootBeer = "0.1.0" mockative = "2.0.1" -firebaseCrashlytics = "18.5.1" anrWatchDog = "1.4.0" kermit = "2.0.2" konsist = "0.11.0" @@ -92,7 +91,6 @@ android-sqlliteDriver = { module = "com.squareup.sqldelight:android-driver", ver android-leakCanary = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakCanary" } android-splashScreen = { module = "androidx.core:core-splashscreen", version.ref = "splashScreen" } android-rootBeer = { module = "com.scottyab:rootbeer-lib", version.ref = "rootBeer" } -android-firebaseCrashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx", version.ref = "firebaseCrashlytics" } android-anrWatchDog = { module = "com.github.anrwatchdog:anrwatchdog", version.ref = "anrWatchDog" } # ANDROID GOOGLE @@ -123,7 +121,6 @@ processors-mockative = { module = "io.mockative:mockative-processor", version.re # CLASSPATHS classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -classpaths-crashlytics = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "crashlytics" } [plugins] @@ -134,7 +131,7 @@ androidApplication = { id = "com.android.application", version.ref = "androidGra androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } safeArgs = { id = "androidx.navigation.safeargs", version.ref = "navigation" } buildKonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildKonfig" } -crashlytics = { id = "com.google.firebase.crashlytics" } +firebaseCrashlyticsPlugin = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin" } googleServices = { id = "com.google.gms.google-services", version.ref = "googleServices" } firebasePerPlugin = { id = "com.google.firebase.firebase-perf", version.ref = "firebasePerPlugin" } sqlDelight = { id = "com.squareup.sqldelight", version.ref = "sqlDelight" } From d38171f9cfa8b168b9cc29af2f972eb72b6454dc Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 12:41:20 +0200 Subject: [PATCH 44/81] [Oztechan/CCC#2931] Get rid of androidGradlePlugin classpath (#2932) --- CCC.gradle.kts | 1 - gradle/libs.versions.toml | 1 - submodule/basemob | 2 +- submodule/logmob | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index cb3cea4b99..36389299f3 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -21,7 +21,6 @@ plugins { buildscript { dependencies { libs.classpaths.apply { - classpath(androidGradlePlugin) classpath(kotlinGradlePlugin) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a601a94af5..1b64a1fa0e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -119,7 +119,6 @@ jvm-testJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref processors-mockative = { module = "io.mockative:mockative-processor", version.ref = "mockative" } # CLASSPATHS -classpaths-androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } [plugins] diff --git a/submodule/basemob b/submodule/basemob index 00ca7ca94b..0d83f72e82 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 00ca7ca94b91f03f5347e20e553706ec6285f72a +Subproject commit 0d83f72e8201e12581a8ee15c09e180195ec42ed diff --git a/submodule/logmob b/submodule/logmob index ba257d1eaa..a65b3b26f8 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit ba257d1eaaa0e3e0b0a7d24d1353e5f0f6e567f0 +Subproject commit a65b3b26f8ac25b9c920333d638c8e4b65fd6457 From b558f18d38c37878636d8e928743ccc8512c8ff9 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Oct 2023 12:45:17 +0200 Subject: [PATCH 45/81] [Oztechan/CCC#2916] Get rid of kover classpath (#2934) --- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodule/parsermob b/submodule/parsermob index 06896a2bb9..b4e7d3979f 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 06896a2bb907c6a5398f925d462bdb484745ad5b +Subproject commit b4e7d3979f2aac93a87cc6f1fcf4ce48adf17c8b diff --git a/submodule/scopemob b/submodule/scopemob index f32568fb1e..41eae6e0ba 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit f32568fb1e5b7b8937c82c65f59eb29756f9bc40 +Subproject commit 41eae6e0ba5fbf54f03d53998ad1dd0b44251d55 From aebe38a25d3cb63bb3dd6b63bafda083b3d80b56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Oct 2023 12:28:40 +0100 Subject: [PATCH 46/81] [Oztechan/CCC#1457] Lock file maintenance (#2897) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 0265e8ed2d..fb032cee17 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,7 +8,7 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.835.0) + aws-partitions (1.839.0) aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) From 3d2435589db1bb7b37ac2af28e637fcfdebc6b28 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Oct 2023 12:29:03 +0100 Subject: [PATCH 47/81] [Oztechan/CCC#1457] Lock file maintenance (#2897) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan From d7c8ce58fe2cdc55d7442282fbd421bb6e2d54ef Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 29 Oct 2023 13:25:43 +0100 Subject: [PATCH 48/81] [Oztechan/CCC#2933] Get rid of kotlinGradlePlugin classpath (#2935) --- CCC.gradle.kts | 8 -------- gradle/libs.versions.toml | 3 --- submodule/basemob | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 6 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index 36389299f3..be755e2173 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -18,14 +18,6 @@ plugins { } } -buildscript { - dependencies { - libs.classpaths.apply { - classpath(kotlinGradlePlugin) - } - } -} - group = ProjectSettings.PROJECT_ID version = ProjectSettings.getVersionName(project) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1b64a1fa0e..b595abff63 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -118,9 +118,6 @@ jvm-testJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref # PROCESSORS processors-mockative = { module = "io.mockative:mockative-processor", version.ref = "mockative" } -# CLASSPATHS -classpaths-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } - [plugins] kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } diff --git a/submodule/basemob b/submodule/basemob index 0d83f72e82..6de9c6a795 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 0d83f72e8201e12581a8ee15c09e180195ec42ed +Subproject commit 6de9c6a79554523b1892a47afbc554cad9eaa69b diff --git a/submodule/logmob b/submodule/logmob index a65b3b26f8..172a066a7e 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit a65b3b26f8ac25b9c920333d638c8e4b65fd6457 +Subproject commit 172a066a7ec6b8053c2fe75ad5f60f412711d996 diff --git a/submodule/parsermob b/submodule/parsermob index b4e7d3979f..d6fdfc47db 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit b4e7d3979f2aac93a87cc6f1fcf4ce48adf17c8b +Subproject commit d6fdfc47db09fb82211c0ab971769e3503f553e2 diff --git a/submodule/scopemob b/submodule/scopemob index 41eae6e0ba..0100b6a16b 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 41eae6e0ba5fbf54f03d53998ad1dd0b44251d55 +Subproject commit 0100b6a16b11fb7fa50907aa960169c8ced97146 From 6e78c3d7fffe7fde7aeb83521bb5a8a1cc65a58a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:50:49 +0100 Subject: [PATCH 49/81] [Oztechan/CCC#1457] Dependency update dependency com.google.firebase:firebase-perf-ktx to v20.5.0 (#2882) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b595abff63..075ae5569b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,7 @@ multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" firebaseRemoteConfig = "21.5.0" googleServices = "4.4.0" -firebasePer = "20.4.1" +firebasePer = "20.5.0" firebasePerPlugin = "1.4.2" firebaseCrashlyticsPlugin = "2.9.9" googleAds = "22.4.0" From f134bd9137c9a00a2e388c1844e5a47df05ba9a7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 22:43:07 +0100 Subject: [PATCH 50/81] [Oztechan/CCC#1457] Lock file maintenance (#2936) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index fb032cee17..83f00374f1 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,7 +8,7 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.839.0) + aws-partitions (1.843.0) aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -21,7 +21,7 @@ GEM aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) - aws-sigv4 (1.6.0) + aws-sigv4 (1.6.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -111,7 +111,7 @@ GEM gh_inspector (1.1.3) google-apis-androidpublisher_v3 (0.51.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.1) + google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -165,7 +165,7 @@ GEM os (1.1.4) plist (3.7.0) public_suffix (5.0.3) - rake (13.0.6) + rake (13.1.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) From a394551307ea66dedea8884ac54f6b13e3c89647 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:26:30 +0100 Subject: [PATCH 51/81] [Oztechan/CCC#1457] Dependency update submodule/logmob digest to 85f2c1f (#2905) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 172a066a7e..85f2c1fdf5 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 172a066a7ec6b8053c2fe75ad5f60f412711d996 +Subproject commit 85f2c1fdf515de383c7517b21e28cd3ca3059559 From 2088e781fdf4e0955180ce6c4c4adff94f7c8ee7 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Thu, 2 Nov 2023 09:45:00 +0100 Subject: [PATCH 52/81] [Oztechan/CCC#2943] Add gradle build scan to CI (#2944) * [Oztechan/CCC#2943] Add gradle build scan to CI * [Oztechan/CCC#2943] Add gradle build scan to CI --- settings.gradle.kts | 18 ++++++++++++++++++ submodule/basemob | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index b7ee701d70..c5e73391b4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,6 +22,24 @@ dependencyResolutionManagement { } } +plugins { + id("com.gradle.enterprise") version ("3.13") +} + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + publishAlways() + + obfuscation { + username { null } + hostname { null } + ipAddresses { null } + } + } +} + include( // region Android only modules ":android:app", diff --git a/submodule/basemob b/submodule/basemob index 6de9c6a795..c2ee9f345e 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 6de9c6a79554523b1892a47afbc554cad9eaa69b +Subproject commit c2ee9f345ebb13547eb6d0a27a855b95dabad841 diff --git a/submodule/logmob b/submodule/logmob index 85f2c1fdf5..477eb7522a 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 85f2c1fdf515de383c7517b21e28cd3ca3059559 +Subproject commit 477eb7522a3dab9e0caa7cdaf65b0bcf3742513b diff --git a/submodule/parsermob b/submodule/parsermob index d6fdfc47db..fd8cf8fb7e 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit d6fdfc47db09fb82211c0ab971769e3503f553e2 +Subproject commit fd8cf8fb7e57cc59aba71ed428416c72bd4b7893 diff --git a/submodule/scopemob b/submodule/scopemob index 0100b6a16b..e5e2277040 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit 0100b6a16b11fb7fa50907aa960169c8ced97146 +Subproject commit e5e2277040092b235dbf3b4c8b96854dff27ad8a From f77b29487937ac07d21454a13ac89c2dd48ff716 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:57:02 +0100 Subject: [PATCH 53/81] [Oztechan/CCC#1457] Dependency update detekt to v1.23.3 (#2939) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 075ae5569b..86f3c7b583 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin = "1.9.10" ksp = "1.9.10-1.0.13" -detekt = "1.23.1" +detekt = "1.23.3" androidGradlePlugin = "8.1.2" composeCompiler = "1.5.3" compose = "1.5.3" From 27ad4677ba8ae29b345b9e7d36e64c36cbd2866a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:57:29 +0100 Subject: [PATCH 54/81] [Oztechan/CCC#1457] Dependency update plugin com.gradle.enterprise to v3.15.1 (#2947) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index c5e73391b4..d129099e7d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,7 +23,7 @@ dependencyResolutionManagement { } plugins { - id("com.gradle.enterprise") version ("3.13") + id("com.gradle.enterprise") version ("3.15.1") } gradleEnterprise { From 7c025f463c76926b771630a8780b8a038ee0d6bb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:57:51 +0100 Subject: [PATCH 55/81] [Oztechan/CCC#1457] Dependency update compose to v1.5.4 (#2878) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 86f3c7b583..7da7799707 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ ksp = "1.9.10-1.0.13" detekt = "1.23.3" androidGradlePlugin = "8.1.2" composeCompiler = "1.5.3" -compose = "1.5.3" +compose = "1.5.4" glance = "1.0.0" material3 = "1.1.2" androidDesugaring = "2.0.3" From 84a0347fc2aadeeddfac7b88479c4476d2cddaf9 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 5 Nov 2023 12:31:09 +0100 Subject: [PATCH 56/81] [Oztechan/CCC#2952] Update jvm args (#2953) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 468440197d..82dcbd1362 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Android android.useAndroidX=true # Gradle -org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=2g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=2g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx8g" org.gradle.parallel=true org.gradle.caching=true org.gradle.daemon=true From e74098e758e16d4d219994c903bb4ab6d6d771aa Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 5 Nov 2023 12:31:38 +0100 Subject: [PATCH 57/81] [Oztechan/CCC#2950] Remove unused ProjectSettings properties (#2951) --- buildSrc/src/main/kotlin/ProjectSettings.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/ProjectSettings.kt b/buildSrc/src/main/kotlin/ProjectSettings.kt index 7846034e69..8d7be385c4 100644 --- a/buildSrc/src/main/kotlin/ProjectSettings.kt +++ b/buildSrc/src/main/kotlin/ProjectSettings.kt @@ -15,9 +15,6 @@ object ProjectSettings { private const val VERSION_DIF = 750 private const val BASE_VERSION_CODE = 937 - const val PROJECT_NAME = "CCC" - const val HOMEPAGE = "https://github.com/Oztechan/CCC" - const val PROJECT_ID = "com.oztechan.ccc" const val ANDROID_APP_ID = "mustafaozhan.github.com.mycurrencies" @@ -27,8 +24,6 @@ object ProjectSettings { const val MIN_SDK_VERSION = 21 const val TARGET_SDK_VERSION = 33 - const val IOS_DEPLOYMENT_TARGET = "14.0" - val JAVA_VERSION = JavaVersion.VERSION_17 @Suppress("TooGenericExceptionCaught", "SwallowedException") From 64f0b516fbf37ce606031d71c43c809c54e3434b Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sun, 5 Nov 2023 12:31:48 +0100 Subject: [PATCH 58/81] [Oztechan/CCC#2954] Update grade file naming logic (#2955) --- settings.gradle.kts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index d129099e7d..d046ef038a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -124,15 +124,12 @@ rootProject.name = "CCC" rootProject.updateBuildFileNames() fun ProjectDescriptor.updateBuildFileNames() { - if (name.startsWith("submodule")) return - - buildFileName = if (this == rootProject) { - rootProject.name - } else { - path.drop(1).replace(":", "-") - }.let { - "$it.gradle.kts" - } + buildFileName = path + .drop(1) + .replace(":", "-") + .dropLastWhile { it != '-' } + .plus(name) + .plus(".gradle.kts") if (children.isNotEmpty()) { children.forEach { it.updateBuildFileNames() } From 1cf0e73faf30d843dd46ff3db56e05db652bef7d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:46:31 +0100 Subject: [PATCH 59/81] [Oztechan/CCC#1457] Dependency update dependency com.android.tools:desugar_jdk_libs to v2.0.4 (#2949) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7da7799707..f6e32fd959 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ composeCompiler = "1.5.3" compose = "1.5.4" glance = "1.0.0" material3 = "1.1.2" -androidDesugaring = "2.0.3" +androidDesugaring = "2.0.4" androidMaterial = "1.10.0" composeActivity = "1.8.0" constraintLayout = "2.1.4" From 7f64b6ae1b72cb7b932ad975790afd4d8c883dab Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:46:54 +0100 Subject: [PATCH 60/81] [Oztechan/CCC#1457] Dependency update navigation to v2.7.5 (#2945) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f6e32fd959..7391a30a95 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -27,7 +27,7 @@ firebaseCrashlyticsPlugin = "2.9.9" googleAds = "22.4.0" huaweiAds = "3.4.66.303" huaweiOsm = "1.3.35" -navigation = "2.7.4" +navigation = "2.7.5" playCore = "1.10.3" kotlinXDateTime = "0.4.1" coroutines = "1.7.3" From 83865410ab4fa6506749d138011ea6dad2274d29 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Tue, 7 Nov 2023 18:50:32 +0100 Subject: [PATCH 61/81] [Oztechan/Config#4] Global config update synced file(s) with Oztechan/Config (#2957) * Oztechan/Config#4 Global config update synced local 'docs/CONTRIBUTING.md' with remote 'docs/CONTRIBUTING.md' * Oztechan/Config#4 Global config update synced local 'docs/PULL_REQUEST_TEMPLATE.md' with remote 'docs/PULL_REQUEST_TEMPLATE.md' --- docs/CONTRIBUTING.md | 12 ++++++------ docs/PULL_REQUEST_TEMPLATE.md | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 68762f40ce..f4eacd7020 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -12,12 +12,12 @@ Example: ## Commit Message -Every commit message should match the following format `[Oztechan/CCC#ISSUE_ID] Commit message` +Every commit message should match the following format `[Oztechan/REPO_NAME#ISSUE_ID] Commit message` Example: ``` -[Oztechan/CCC#123] My cool feature +[Oztechan/Config#123] My cool feature ``` ## Pull Request @@ -27,23 +27,23 @@ Example: Pull Request title should follow below format: ``` -[Oztechan/CCC#ISSUE_ID] ISSUE_TITLE +[Oztechan/REPO_NAME#ISSUE_ID] ISSUE_TITLE ``` Example: ``` -[Oztechan/CCC#ISSUE_ID] Whatever the name of ticket is +[Oztechan/Config#123] Whatever the name of ticket is ``` ### Description -Description has to have `Resloves Oztechan/CCC#ISSUE_ID` with relevant issue. It will help automatically close relevant issue once the PR is merged. +Description has to have `Resloves Oztechan/REPO_NAME#ISSUE_ID` with relevant issue. It will help automatically close relevant issue once the PR is merged. Example: ``` -Resolves Oztechan/CCC#123 +Resolves Oztechan/Config#123 Some description. ``` diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md index 97630d92e7..e4875821a0 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,12 @@ ## Description -Resolves Oztechan/CCC* +Resolves Oztechan/REPO_NAME#ISSUE_ID From 3c821d53dd6473f76d263396c3fbc5772e92c29f Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 8 Nov 2023 12:12:43 +0100 Subject: [PATCH 62/81] [Oztechan/Config#4] Global config update synced file(s) with Oztechan/Config (#2959) --- renovate.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renovate.json b/renovate.json index 8d1b71d35f..fc0ab322db 100644 --- a/renovate.json +++ b/renovate.json @@ -9,19 +9,19 @@ "rebaseWhen": "conflicted", "gitAuthor": "Renovate ", "commitBody": "Co-authored-by: Mustafa Ozhan ", - "commitMessageAction": "[Oztechan/CCC#1457] Dependency update", + "commitMessageAction": "[Oztechan/Config#12] Update", "git-submodules": { "enabled": true, "groupName": "Git Submodules" }, "lockFileMaintenance": { "enabled": true, - "commitMessageAction": "[Oztechan/CCC#1457] Lock file maintenance" + "commitMessageAction": "[Oztechan/Config#12] Lock file maintenance" }, "packageRules": [ { "matchPackagePatterns": [ - "^org.jetbrains.kotlin:kotlin", + "^org.jetbrains.kotlin.", "^com.google.devtools.ksp", "^androidx.compose.compiler" ], From d51af66f3b19d02178101b7f1862fda52c91c5b1 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 8 Nov 2023 12:46:31 +0100 Subject: [PATCH 63/81] [Oztechan/Config#4] Global config update synced file(s) with Oztechan/Config (#2962) --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index fc0ab322db..ce4bf8c9ad 100644 --- a/renovate.json +++ b/renovate.json @@ -21,7 +21,7 @@ "packageRules": [ { "matchPackagePatterns": [ - "^org.jetbrains.kotlin.", + "^org.jetbrains.kotlin", "^com.google.devtools.ksp", "^androidx.compose.compiler" ], From 2d7daa11698ef1cad20f912fb13a1e0c2fbf37bc Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Wed, 8 Nov 2023 13:22:39 +0100 Subject: [PATCH 64/81] [Oztechan/Config#4] Global config update synced file(s) with Oztechan/Config (#2963) --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index ce4bf8c9ad..25c534aa9e 100644 --- a/renovate.json +++ b/renovate.json @@ -21,7 +21,7 @@ "packageRules": [ { "matchPackagePatterns": [ - "^org.jetbrains.kotlin", + "^org.jetbrains.kotlin:kotlin", "^com.google.devtools.ksp", "^androidx.compose.compiler" ], From 6f48c1ba1a62358391edf3095d31a6b1b83dfa07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:05:55 +0100 Subject: [PATCH 65/81] [Oztechan/Config#12] Update kotlin (#2938) * [Oztechan/Config#12] Update kotlin Co-authored-by: Mustafa Ozhan * [Oztechan/Config#12] Update kotlin --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- CCC.gradle.kts | 2 + .../ad/client-configservice-ad.gradle.kts | 19 +-- .../client-configservice-review.gradle.kts | 18 +-- .../client-configservice-update.gradle.kts | 18 +-- .../client-core-analytics.gradle.kts | 26 ++-- .../client-core-persistence.gradle.kts | 30 ++--- .../client-core-remoteconfig.gradle.kts | 26 ++-- client/core/res/client-core-res.gradle.kts | 16 +-- .../core/shared/client-core-shared.gradle.kts | 18 +-- .../client-core-viewmodel.gradle.kts | 26 ++-- .../client-datasource-currency.gradle.kts | 38 +++--- .../client-datasource-watcher.gradle.kts | 38 +++--- .../client-repository-adcontrol.gradle.kts | 26 ++-- .../client-repository-appconfig.gradle.kts | 46 +++---- .../backend/client-service-backend.gradle.kts | 38 +++--- .../storage/app/client-storage-app.gradle.kts | 22 ++-- .../client-storage-calculation.gradle.kts | 22 ++-- .../client-viewmodel-calculator.gradle.kts | 88 ++++++-------- .../client-viewmodel-currencies.gradle.kts | 76 ++++++------ .../main/client-viewmodel-main.gradle.kts | 66 +++++------ .../client-viewmodel-premium.gradle.kts | 56 ++++----- ...client-viewmodel-selectcurrency.gradle.kts | 54 ++++----- .../client-viewmodel-settings.gradle.kts | 88 ++++++-------- .../client-viewmodel-watchers.gradle.kts | 64 +++++----- .../database/common-core-database.gradle.kts | 46 +++---- .../common-core-infrastructure.gradle.kts | 14 +-- .../core/model/common-core-model.gradle.kts | 12 +- .../network/common-core-network.gradle.kts | 73 ++++++------ .../common-datasource-conversion.gradle.kts | 38 +++--- gradle/libs.versions.toml | 6 +- ios/provider/ios-provider.gradle.kts | 112 +++++++++--------- .../ios-repository-background.gradle.kts | 36 +++--- 32 files changed, 511 insertions(+), 747 deletions(-) diff --git a/CCC.gradle.kts b/CCC.gradle.kts index be755e2173..2bd1abe352 100755 --- a/CCC.gradle.kts +++ b/CCC.gradle.kts @@ -69,6 +69,8 @@ allprojects { } tasks.withType { kotlinOptions { + // todo remove when not needed anymore + freeCompilerArgs += "-Xexpect-actual-classes" allWarningsAsErrors = true } } diff --git a/client/configservice/ad/client-configservice-ad.gradle.kts b/client/configservice/ad/client-configservice-ad.gradle.kts index ab1373a516..6f08252a79 100644 --- a/client/configservice/ad/client-configservice-ad.gradle.kts +++ b/client/configservice/ad/client-configservice-ad.gradle.kts @@ -6,27 +6,20 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Core.remoteConfig)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Core.remoteConfig)) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + + commonTest.dependencies { + implementation(libs.common.test) } } } diff --git a/client/configservice/review/client-configservice-review.gradle.kts b/client/configservice/review/client-configservice-review.gradle.kts index a48e499cce..066f2da801 100644 --- a/client/configservice/review/client-configservice-review.gradle.kts +++ b/client/configservice/review/client-configservice-review.gradle.kts @@ -6,27 +6,19 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Core.remoteConfig)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Core.remoteConfig)) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } } } diff --git a/client/configservice/update/client-configservice-update.gradle.kts b/client/configservice/update/client-configservice-update.gradle.kts index 247cd2140b..3b58214870 100644 --- a/client/configservice/update/client-configservice-update.gradle.kts +++ b/client/configservice/update/client-configservice-update.gradle.kts @@ -6,27 +6,19 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Core.remoteConfig)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Core.remoteConfig)) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } } } diff --git a/client/core/analytics/client-core-analytics.gradle.kts b/client/core/analytics/client-core-analytics.gradle.kts index b7cc621241..0d3945187e 100644 --- a/client/core/analytics/client-core-analytics.gradle.kts +++ b/client/core/analytics/client-core-analytics.gradle.kts @@ -6,33 +6,23 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - } + commonMain.dependencies { + implementation(libs.common.koinCore) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } - val androidMain by getting { - dependencies { - libs.android.apply { - implementation(firebaseAnalytics) - implementation(rootBeer) - } + androidMain.dependencies { + libs.android.apply { + implementation(firebaseAnalytics) + implementation(rootBeer) } } } diff --git a/client/core/persistence/client-core-persistence.gradle.kts b/client/core/persistence/client-core-persistence.gradle.kts index 028a39fa05..e9fb57e403 100644 --- a/client/core/persistence/client-core-persistence.gradle.kts +++ b/client/core/persistence/client-core-persistence.gradle.kts @@ -8,34 +8,26 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(multiplatformSettings) - implementation(multiplatformSettingsCoroutines) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(multiplatformSettings) + implementation(multiplatformSettingsCoroutines) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts index 4202a62e95..71ec76fb9e 100644 --- a/client/core/remoteconfig/client-core-remoteconfig.gradle.kts +++ b/client/core/remoteconfig/client-core-remoteconfig.gradle.kts @@ -7,34 +7,24 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(ktorJson) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(ktorJson) + implementation(kermit) } } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } - val androidMain by getting { - dependencies { - implementation(libs.android.firebaseRemoteConfig) - } + androidMain.dependencies { + implementation(libs.android.firebaseRemoteConfig) } } } diff --git a/client/core/res/client-core-res.gradle.kts b/client/core/res/client-core-res.gradle.kts index 419e1b2276..80986f994e 100644 --- a/client/core/res/client-core-res.gradle.kts +++ b/client/core/res/client-core-res.gradle.kts @@ -9,9 +9,6 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() listOf( @@ -25,17 +22,12 @@ kotlin { } } - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.mokoResources) - } + commonMain.dependencies { + implementation(libs.common.mokoResources) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } } } diff --git a/client/core/shared/client-core-shared.gradle.kts b/client/core/shared/client-core-shared.gradle.kts index afb0be71d5..c4629857f7 100644 --- a/client/core/shared/client-core-shared.gradle.kts +++ b/client/core/shared/client-core-shared.gradle.kts @@ -2,27 +2,19 @@ plugins { alias(libs.plugins.kotlinMultiplatform) } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - iosX64() iosArm64() iosSimulatorArm64() jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.kotlinXDateTime) - implementation(project(Modules.Common.Core.model)) - } + commonMain.dependencies { + implementation(libs.common.kotlinXDateTime) + implementation(project(Modules.Common.Core.model)) } - val commonTest by getting { - dependencies { - implementation(libs.common.test) - } + commonTest.dependencies { + implementation(libs.common.test) } } } diff --git a/client/core/viewmodel/client-core-viewmodel.gradle.kts b/client/core/viewmodel/client-core-viewmodel.gradle.kts index 224360db61..03970e5965 100644 --- a/client/core/viewmodel/client-core-viewmodel.gradle.kts +++ b/client/core/viewmodel/client-core-viewmodel.gradle.kts @@ -5,32 +5,24 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) } } - val androidMain by getting { - dependencies { - libs.android.apply { - implementation(koinAndroid) - implementation(lifecycleViewmodel) - } + androidMain.dependencies { + libs.android.apply { + implementation(koinAndroid) + implementation(lifecycleViewmodel) } } } diff --git a/client/datasource/currency/client-datasource-currency.gradle.kts b/client/datasource/currency/client-datasource-currency.gradle.kts index a9dc8715a7..9fc370bcf5 100644 --- a/client/datasource/currency/client-datasource-currency.gradle.kts +++ b/client/datasource/currency/client-datasource-currency.gradle.kts @@ -7,38 +7,30 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } - Modules.Common.Core.apply { - implementation(project(database)) - implementation(project(model)) - implementation(project(infrastructure)) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } + Modules.Common.Core.apply { + implementation(project(database)) + implementation(project(model)) + implementation(project(infrastructure)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/client/datasource/watcher/client-datasource-watcher.gradle.kts b/client/datasource/watcher/client-datasource-watcher.gradle.kts index 45bed5f036..17b7a6098e 100644 --- a/client/datasource/watcher/client-datasource-watcher.gradle.kts +++ b/client/datasource/watcher/client-datasource-watcher.gradle.kts @@ -7,38 +7,30 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } - Modules.Common.Core.apply { - implementation(project(database)) - implementation(project(model)) - implementation(project(infrastructure)) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } + Modules.Common.Core.apply { + implementation(project(database)) + implementation(project(model)) + implementation(project(infrastructure)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts index 263b1978ed..3cddcc191c 100644 --- a/client/repository/adcontrol/client-repository-adcontrol.gradle.kts +++ b/client/repository/adcontrol/client-repository-adcontrol.gradle.kts @@ -7,31 +7,23 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Storage.app)) - implementation(project(Modules.Client.ConfigService.ad)) - implementation(project(Modules.Client.Core.shared)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Storage.app)) + implementation(project(Modules.Client.ConfigService.ad)) + implementation(project(Modules.Client.Core.shared)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) } } } diff --git a/client/repository/appconfig/client-repository-appconfig.gradle.kts b/client/repository/appconfig/client-repository-appconfig.gradle.kts index e19a0a876e..b4f49c5b0a 100644 --- a/client/repository/appconfig/client-repository-appconfig.gradle.kts +++ b/client/repository/appconfig/client-repository-appconfig.gradle.kts @@ -12,36 +12,28 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) + commonMain.dependencies { + implementation(libs.common.koinCore) - Modules.Client.ConfigService.apply { - implementation(project(update)) - implementation(project(review)) - } - implementation(project(Modules.Client.Storage.app)) - implementation(project(Modules.Client.Core.shared)) - implementation(Submodules.scopemob) + Modules.Client.ConfigService.apply { + implementation(project(update)) + implementation(project(review)) } + implementation(project(Modules.Client.Storage.app)) + implementation(project(Modules.Client.Core.shared)) + implementation(Submodules.scopemob) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) } } } @@ -72,7 +64,17 @@ configure { packageName = Modules.Client.Repository.appConfig.packageName defaultConfigs { - buildConfigField(INT, "versionCode", ProjectSettings.getVersionCode(project).toString(), const = true) - buildConfigField(STRING, "versionName", ProjectSettings.getVersionName(project), const = true) + buildConfigField( + INT, + "versionCode", + ProjectSettings.getVersionCode(project).toString(), + const = true + ) + buildConfigField( + STRING, + "versionName", + ProjectSettings.getVersionName(project), + const = true + ) } } diff --git a/client/service/backend/client-service-backend.gradle.kts b/client/service/backend/client-service-backend.gradle.kts index 8a43a65ef6..8571d30ab9 100644 --- a/client/service/backend/client-service-backend.gradle.kts +++ b/client/service/backend/client-service-backend.gradle.kts @@ -7,38 +7,30 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } - Modules.Common.Core.apply { - implementation(project(network)) - implementation(project(model)) - implementation(project(infrastructure)) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } + Modules.Common.Core.apply { + implementation(project(network)) + implementation(project(model)) + implementation(project(infrastructure)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/client/storage/app/client-storage-app.gradle.kts b/client/storage/app/client-storage-app.gradle.kts index 48746877f3..5b4d634d95 100644 --- a/client/storage/app/client-storage-app.gradle.kts +++ b/client/storage/app/client-storage-app.gradle.kts @@ -6,29 +6,21 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Core.persistence)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Core.persistence)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) } } } diff --git a/client/storage/calculation/client-storage-calculation.gradle.kts b/client/storage/calculation/client-storage-calculation.gradle.kts index 9b7ac0a5b2..024143a5fb 100644 --- a/client/storage/calculation/client-storage-calculation.gradle.kts +++ b/client/storage/calculation/client-storage-calculation.gradle.kts @@ -6,29 +6,21 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - implementation(libs.common.koinCore) - implementation(project(Modules.Client.Core.persistence)) - } + commonMain.dependencies { + implementation(libs.common.koinCore) + implementation(project(Modules.Client.Core.persistence)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) } } } diff --git a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts index 6676d6e7a1..abb2431b51 100644 --- a/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts +++ b/client/viewmodel/calculator/client-viewmodel-calculator.gradle.kts @@ -6,68 +6,58 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(shared)) - implementation(project(analytics)) - } - Modules.Client.DataSource.apply { - implementation(project(currency)) - } - Modules.Client.Storage.apply { - implementation(project(calculation)) - } - Modules.Client.Repository.apply { - implementation(project(adControl)) - } - Modules.Client.Service.apply { - implementation(project(backend)) - } - Modules.Common.Core.apply { - implementation(project(model)) - } - Modules.Common.DataSource.apply { - implementation(project(conversion)) - } - Submodules.apply { - implementation(scopemob) - implementation(parsermob) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(shared)) + implementation(project(analytics)) } - } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + } + Modules.Client.Storage.apply { + implementation(project(calculation)) + } + Modules.Client.Repository.apply { + implementation(project(adControl)) + } + Modules.Client.Service.apply { + implementation(project(backend)) + } + Modules.Common.Core.apply { + implementation(project(model)) + } + Modules.Common.DataSource.apply { + implementation(project(conversion)) + } + Submodules.apply { + implementation(scopemob) + implementation(parsermob) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) + } } } diff --git a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts index 354ad3595a..38265a33ec 100644 --- a/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts +++ b/client/viewmodel/currencies/client-viewmodel-currencies.gradle.kts @@ -6,62 +6,52 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(analytics)) - implementation(project(shared)) - } - Modules.Client.DataSource.apply { - implementation(project(currency)) - } - Modules.Client.Storage.apply { - implementation(project(app)) - implementation(project(calculation)) - } - Modules.Client.Repository.apply { - implementation(project(adControl)) - } - Modules.Common.Core.apply { - implementation(project(model)) - } - Submodules.apply { - implementation(scopemob) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(analytics)) + implementation(project(shared)) } - } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + } + Modules.Client.Storage.apply { + implementation(project(app)) + implementation(project(calculation)) + } + Modules.Client.Repository.apply { + implementation(project(adControl)) + } + Modules.Common.Core.apply { + implementation(project(model)) + } + Submodules.apply { + implementation(scopemob) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) + } } } diff --git a/client/viewmodel/main/client-viewmodel-main.gradle.kts b/client/viewmodel/main/client-viewmodel-main.gradle.kts index e59fe286c4..718f0c58cd 100644 --- a/client/viewmodel/main/client-viewmodel-main.gradle.kts +++ b/client/viewmodel/main/client-viewmodel-main.gradle.kts @@ -6,57 +6,47 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(shared)) - implementation(project(analytics)) - } - Modules.Client.Storage.apply { - implementation(project(app)) - } - Modules.Client.Repository.apply { - implementation(project(appConfig)) - implementation(project(adControl)) - } - Modules.Client.ConfigService.apply { - implementation(project(ad)) - implementation(project(review)) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(shared)) + implementation(project(analytics)) } - } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + Modules.Client.Storage.apply { + implementation(project(app)) + } + Modules.Client.Repository.apply { + implementation(project(appConfig)) + implementation(project(adControl)) + } + Modules.Client.ConfigService.apply { + implementation(project(ad)) + implementation(project(review)) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) + } } } diff --git a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts index 4b9cd9fdb9..f6cdff3a9a 100644 --- a/client/viewmodel/premium/client-viewmodel-premium.gradle.kts +++ b/client/viewmodel/premium/client-viewmodel-premium.gradle.kts @@ -6,53 +6,43 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(kermit) - implementation(coroutines) - implementation(kotlinXDateTime) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(kermit) + implementation(coroutines) + implementation(kotlinXDateTime) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(shared)) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(shared)) + } - Modules.Client.Storage.apply { - implementation(project(app)) - } + Modules.Client.Storage.apply { + implementation(project(app)) + } - Submodules.apply { - implementation(scopemob) - } + Submodules.apply { + implementation(scopemob) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) - } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) } } } diff --git a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts index 42d503b39b..bd79ec9ace 100644 --- a/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts +++ b/client/viewmodel/selectcurrency/client-viewmodel-selectcurrency.gradle.kts @@ -6,52 +6,42 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(shared)) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(shared)) + } - Modules.Client.DataSource.apply { - implementation(project(currency)) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + } - Modules.Common.Core.apply { - implementation(project(model)) - } + Modules.Common.Core.apply { + implementation(project(model)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) - } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) } } } diff --git a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts index d82915fcb4..842834d864 100644 --- a/client/viewmodel/settings/client-viewmodel-settings.gradle.kts +++ b/client/viewmodel/settings/client-viewmodel-settings.gradle.kts @@ -6,70 +6,60 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kotlinXDateTime) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kotlinXDateTime) + implementation(kermit) + } - Modules.Client.Core.apply { - implementation(project(viewModel)) - implementation(project(shared)) - implementation(project(analytics)) - } + Modules.Client.Core.apply { + implementation(project(viewModel)) + implementation(project(shared)) + implementation(project(analytics)) + } - Modules.Client.Storage.apply { - implementation(project(app)) - implementation(project(calculation)) - } + Modules.Client.Storage.apply { + implementation(project(app)) + implementation(project(calculation)) + } - Modules.Client.DataSource.apply { - implementation(project(currency)) - implementation(project(watcher)) - } - Modules.Common.DataSource.apply { - implementation(project(conversion)) - } - Modules.Common.Core.apply { - implementation(project(model)) - } - Modules.Client.Service.apply { - implementation(project(backend)) - } - Modules.Client.Repository.apply { - implementation(project(adControl)) - implementation(project(appConfig)) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + implementation(project(watcher)) } - } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + Modules.Common.DataSource.apply { + implementation(project(conversion)) + } + Modules.Common.Core.apply { + implementation(project(model)) + } + Modules.Client.Service.apply { + implementation(project(backend)) + } + Modules.Client.Repository.apply { + implementation(project(adControl)) + implementation(project(appConfig)) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) + } } } diff --git a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts index 8beae2600f..fece5adf77 100644 --- a/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts +++ b/client/viewmodel/watchers/client-viewmodel-watchers.gradle.kts @@ -6,58 +6,48 @@ plugins { } } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } - Modules.Common.Core.apply { - implementation(project(model)) - } + Modules.Common.Core.apply { + implementation(project(model)) + } - Modules.Client.Core.apply { - implementation(project(analytics)) - implementation(project(viewModel)) - implementation(project(shared)) - } + Modules.Client.Core.apply { + implementation(project(analytics)) + implementation(project(viewModel)) + implementation(project(shared)) + } - Modules.Client.DataSource.apply { - implementation(project(currency)) - implementation(project(watcher)) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + implementation(project(watcher)) + } - Modules.Client.Repository.apply { - implementation(project(adControl)) - } + Modules.Client.Repository.apply { + implementation(project(adControl)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } - val androidMain by getting { - dependencies { - implementation(libs.android.lifecycleViewmodel) - } + androidMain.dependencies { + implementation(libs.android.lifecycleViewmodel) } } } diff --git a/common/core/database/common-core-database.gradle.kts b/common/core/database/common-core-database.gradle.kts index caa7827277..f7373818cf 100644 --- a/common/core/database/common-core-database.gradle.kts +++ b/common/core/database/common-core-database.gradle.kts @@ -7,9 +7,6 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() @@ -18,40 +15,29 @@ kotlin { jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(sqlDelightCoroutinesExt) - } - implementation(project(Modules.Common.Core.model)) + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(sqlDelightCoroutinesExt) } + implementation(project(Modules.Common.Core.model)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(coroutinesTest) } } - val androidMain by getting { - dependencies { - implementation(libs.android.sqlliteDriver) - } + androidMain.dependencies { + implementation(libs.android.sqlliteDriver) } - val iosMain by getting { - dependencies { - implementation(libs.ios.sqlliteDriver) - } + iosMain.dependencies { + implementation(libs.ios.sqlliteDriver) } - val jvmMain by getting { - dependencies { - implementation(libs.jvm.sqlliteDriver) - } + jvmMain.dependencies { + implementation(libs.jvm.sqlliteDriver) } } } diff --git a/common/core/infrastructure/common-core-infrastructure.gradle.kts b/common/core/infrastructure/common-core-infrastructure.gradle.kts index 62f0b09e33..d523c7158c 100644 --- a/common/core/infrastructure/common-core-infrastructure.gradle.kts +++ b/common/core/infrastructure/common-core-infrastructure.gradle.kts @@ -3,23 +3,17 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - iosX64() iosArm64() iosSimulatorArm64() jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) } } } diff --git a/common/core/model/common-core-model.gradle.kts b/common/core/model/common-core-model.gradle.kts index 66ea564727..77ad29cac7 100644 --- a/common/core/model/common-core-model.gradle.kts +++ b/common/core/model/common-core-model.gradle.kts @@ -3,22 +3,16 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - iosX64() iosArm64() iosSimulatorArm64() jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) } } } diff --git a/common/core/network/common-core-network.gradle.kts b/common/core/network/common-core-network.gradle.kts index 2285184fc5..d98ad9d50e 100644 --- a/common/core/network/common-core-network.gradle.kts +++ b/common/core/network/common-core-network.gradle.kts @@ -13,9 +13,6 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() @@ -24,43 +21,32 @@ kotlin { jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(coroutines) - implementation(koinCore) - implementation(ktorLogging) - implementation(ktorClientContentNegotiation) - implementation(ktorJson) - } - implementation(project(Modules.Common.Core.model)) + commonMain.dependencies { + libs.common.apply { + implementation(coroutines) + implementation(koinCore) + implementation(ktorLogging) + implementation(ktorClientContentNegotiation) + implementation(ktorJson) } + implementation(project(Modules.Common.Core.model)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(coroutinesTest) - implementation(ktorClientMock) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(coroutinesTest) + implementation(ktorClientMock) } } - val androidMain by getting { - dependencies { - implementation(libs.android.ktor) - } + androidMain.dependencies { + implementation(libs.android.ktor) } - val iosMain by getting { - dependencies { - implementation(libs.ios.ktor) - } + iosMain.dependencies { + implementation(libs.ios.ktor) } - val jvmMain by getting { - dependencies { - implementation(libs.jvm.ktor) - } + jvmMain.dependencies { + implementation(libs.jvm.ktor) } } } @@ -82,9 +68,24 @@ configure { packageName = Modules.Common.Core.network.packageName defaultConfigs { - buildConfigField(STRING, Key.BASE_URL_BACKEND.name, secret(Key.BASE_URL_BACKEND), const = true) + buildConfigField( + STRING, + Key.BASE_URL_BACKEND.name, + secret(Key.BASE_URL_BACKEND), + const = true + ) buildConfigField(STRING, Key.BASE_URL_API.name, secret(Key.BASE_URL_API), const = true) - buildConfigField(STRING, Key.BASE_URL_API_PREMIUM.name, secret(Key.BASE_URL_API_PREMIUM), const = true) - buildConfigField(STRING, Key.API_KEY_PREMIUM.name, secret(Key.API_KEY_PREMIUM), const = true) + buildConfigField( + STRING, + Key.BASE_URL_API_PREMIUM.name, + secret(Key.BASE_URL_API_PREMIUM), + const = true + ) + buildConfigField( + STRING, + Key.API_KEY_PREMIUM.name, + secret(Key.API_KEY_PREMIUM), + const = true + ) } } diff --git a/common/datasource/conversion/common-datasource-conversion.gradle.kts b/common/datasource/conversion/common-datasource-conversion.gradle.kts index 5998bdd0f0..116d04cce8 100644 --- a/common/datasource/conversion/common-datasource-conversion.gradle.kts +++ b/common/datasource/conversion/common-datasource-conversion.gradle.kts @@ -7,9 +7,6 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() iosX64() @@ -18,29 +15,24 @@ kotlin { jvm() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } - Modules.Common.Core.apply { - implementation(project(database)) - implementation(project(model)) - implementation(project(infrastructure)) - } + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) + } + Modules.Common.Core.apply { + implementation(project(database)) + implementation(project(model)) + implementation(project(infrastructure)) } } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(mockative) - implementation(coroutinesTest) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(mockative) + implementation(coroutinesTest) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7391a30a95..0e5bc53870 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] -kotlin = "1.9.10" -ksp = "1.9.10-1.0.13" +kotlin = "1.9.20" +ksp = "1.9.20-1.0.14" detekt = "1.23.3" androidGradlePlugin = "8.1.2" -composeCompiler = "1.5.3" +composeCompiler = "1.5.4" compose = "1.5.4" glance = "1.0.0" material3 = "1.1.2" diff --git a/ios/provider/ios-provider.gradle.kts b/ios/provider/ios-provider.gradle.kts index aab9d4c415..a2e0f996c8 100644 --- a/ios/provider/ios-provider.gradle.kts +++ b/ios/provider/ios-provider.gradle.kts @@ -3,9 +3,6 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - listOf( iosX64(), iosArm64(), @@ -36,72 +33,69 @@ kotlin { } } - @Suppress("UNUSED_VARIABLE") sourceSets { - val iosMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(kermit) - } - - api(project(Modules.IOS.Repository.background)) - api(project(Modules.Common.Core.model)) + iosMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(kermit) + } - Modules.Client.Core.apply { - api(project(viewModel)) - api(project(analytics)) - api(project(shared)) - } + api(project(Modules.IOS.Repository.background)) + api(project(Modules.Common.Core.model)) - Modules.Client.ViewModel.apply { - api(project(main)) - api(project(calculator)) - api(project(currencies)) - api(project(settings)) - api(project(selectCurrency)) - api(project(watchers)) - api(project(premium)) - } + Modules.Client.Core.apply { + api(project(viewModel)) + api(project(analytics)) + api(project(shared)) + } - Modules.Common.Core.apply { - implementation(project(database)) - implementation(project(network)) - implementation(project(infrastructure)) - } + Modules.Client.ViewModel.apply { + api(project(main)) + api(project(calculator)) + api(project(currencies)) + api(project(settings)) + api(project(selectCurrency)) + api(project(watchers)) + api(project(premium)) + } - Modules.Common.DataSource.apply { - implementation(project(conversion)) - } + Modules.Common.Core.apply { + implementation(project(database)) + implementation(project(network)) + implementation(project(infrastructure)) + } - Modules.Client.Core.apply { - implementation(project(persistence)) - } - Modules.Client.Storage.apply { - implementation(project(app)) - implementation(project(calculation)) - } + Modules.Common.DataSource.apply { + implementation(project(conversion)) + } - Modules.Client.DataSource.apply { - implementation(project(currency)) - implementation(project(watcher)) - } - Modules.Client.Service.apply { - implementation(project(backend)) - } - Modules.Client.ConfigService.apply { - implementation(project(ad)) - implementation(project(review)) - implementation(project(update)) - } + Modules.Client.Core.apply { + implementation(project(persistence)) + } + Modules.Client.Storage.apply { + implementation(project(app)) + implementation(project(calculation)) + } - Modules.Client.Repository.apply { - implementation(project(adControl)) - implementation(project(appConfig)) - } + Modules.Client.DataSource.apply { + implementation(project(currency)) + implementation(project(watcher)) + } + Modules.Client.Service.apply { + implementation(project(backend)) + } + Modules.Client.ConfigService.apply { + implementation(project(ad)) + implementation(project(review)) + implementation(project(update)) + } - implementation(Submodules.logmob) + Modules.Client.Repository.apply { + implementation(project(adControl)) + implementation(project(appConfig)) } + + implementation(Submodules.logmob) } } } diff --git a/ios/repository/background/ios-repository-background.gradle.kts b/ios/repository/background/ios-repository-background.gradle.kts index 2f99dc7947..4e2e030234 100644 --- a/ios/repository/background/ios-repository-background.gradle.kts +++ b/ios/repository/background/ios-repository-background.gradle.kts @@ -6,35 +6,27 @@ plugins { } kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - iosX64() iosArm64() iosSimulatorArm64() - @Suppress("UNUSED_VARIABLE") sourceSets { - val commonMain by getting { - dependencies { - libs.common.apply { - implementation(koinCore) - implementation(coroutines) - implementation(kermit) - } - implementation(project(Modules.Client.DataSource.watcher)) - implementation(project(Modules.Client.Service.backend)) - implementation(project(Modules.Client.Core.shared)) - implementation(project(Modules.Common.Core.model)) + commonMain.dependencies { + libs.common.apply { + implementation(koinCore) + implementation(coroutines) + implementation(kermit) } + implementation(project(Modules.Client.DataSource.watcher)) + implementation(project(Modules.Client.Service.backend)) + implementation(project(Modules.Client.Core.shared)) + implementation(project(Modules.Common.Core.model)) } - val commonTest by getting { - dependencies { - libs.common.apply { - implementation(test) - implementation(coroutinesTest) - implementation(mockative) - } + commonTest.dependencies { + libs.common.apply { + implementation(test) + implementation(coroutinesTest) + implementation(mockative) } } } From 1e6329b2abac5cb0d41a8093afc51a2792856c93 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 09:22:19 +0100 Subject: [PATCH 66/81] [Oztechan/Config#12] Update Git Submodules (#2946) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodule/basemob b/submodule/basemob index c2ee9f345e..2ec9e19fc3 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit c2ee9f345ebb13547eb6d0a27a855b95dabad841 +Subproject commit 2ec9e19fc3574dd4d6c89b229b43a266c074d65f diff --git a/submodule/logmob b/submodule/logmob index 477eb7522a..1f6f569902 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 477eb7522a3dab9e0caa7cdaf65b0bcf3742513b +Subproject commit 1f6f5699021e3d7d2da4e1f4c1cc43857f772f3a diff --git a/submodule/parsermob b/submodule/parsermob index fd8cf8fb7e..591a977bd3 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit fd8cf8fb7e57cc59aba71ed428416c72bd4b7893 +Subproject commit 591a977bd3651d228c247c9aa6f452b3c58ba46d diff --git a/submodule/scopemob b/submodule/scopemob index e5e2277040..c80d26e86a 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit e5e2277040092b235dbf3b4c8b96854dff27ad8a +Subproject commit c80d26e86ace353c489339ad299df682ff616b2c From 4b2b79036ee285e817ca708ac5976d9ac66dcfa7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:27:18 +0100 Subject: [PATCH 67/81] [Oztechan/Config#12] Update ktor to v2.3.6 (#2812) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0e5bc53870..a1b2a9c110 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ koinCore = "3.5.0" koinCompose = "3.5.0" koinAndroid = "3.5.0" koinKtor = "3.5.1" -ktor = "2.3.4" +ktor = "2.3.6" multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" firebaseRemoteConfig = "21.5.0" From 0d8bee72fd6487474c3afea268db8e64df31dbe8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:27:35 +0100 Subject: [PATCH 68/81] [Oztechan/Config#12] Lock file maintenance (#2956) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 83f00374f1..a569b253f8 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,8 +8,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.843.0) - aws-sdk-core (3.185.1) + aws-partitions (1.848.0) + aws-sdk-core (3.186.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -126,19 +126,19 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-playcustomapp_v1 (0.13.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) + google-apis-storage_v1 (0.29.0) + google-apis-core (>= 0.11.0, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.3.1) - google-cloud-storage (1.44.0) + google-cloud-storage (1.45.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-storage_v1 (~> 0.29.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) From bd7c760f0d545c2aa6e4ff62798b8ed7254f329c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 23:58:48 +0100 Subject: [PATCH 69/81] [Oztechan/Config#12] Update androidGradlePlugin to v8.1.3 (#2960) * [Oztechan/Config#12] Update androidGradlePlugin to v8.1.3 Co-authored-by: Mustafa Ozhan * [Oztechan/Config#12] Update androidGradlePlugin to v8.1.3 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- submodule/basemob | 2 +- submodule/logmob | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a1b2a9c110..869410b5c4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ kotlin = "1.9.20" ksp = "1.9.20-1.0.14" detekt = "1.23.3" -androidGradlePlugin = "8.1.2" +androidGradlePlugin = "8.1.3" composeCompiler = "1.5.4" compose = "1.5.4" glance = "1.0.0" diff --git a/submodule/basemob b/submodule/basemob index 2ec9e19fc3..f501f6e267 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 2ec9e19fc3574dd4d6c89b229b43a266c074d65f +Subproject commit f501f6e26709877968425d63e1a6fdb9c43d4831 diff --git a/submodule/logmob b/submodule/logmob index 1f6f569902..4eb0a462b7 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 1f6f5699021e3d7d2da4e1f4c1cc43857f772f3a +Subproject commit 4eb0a462b73c0bb89cccb9b86bc4e0229e1870d8 From a783e70d0817a23508b8143da7c6fc79f5a3f934 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:27:30 +0100 Subject: [PATCH 70/81] [Oztechan/Config#12] Update dependency com.google.android.gms:play-services-ads to v22.5.0 (#2937) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 869410b5c4..f45c3c06c5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -24,7 +24,7 @@ googleServices = "4.4.0" firebasePer = "20.5.0" firebasePerPlugin = "1.4.2" firebaseCrashlyticsPlugin = "2.9.9" -googleAds = "22.4.0" +googleAds = "22.5.0" huaweiAds = "3.4.66.303" huaweiOsm = "1.3.35" navigation = "2.7.5" From 9cebb6f536e4dd0d91ee5abb6b807767a6043ed4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 23:35:53 +0100 Subject: [PATCH 71/81] [Oztechan/Config#12] Update submodule/basemob digest to 1281eb5 (#2964) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/basemob b/submodule/basemob index f501f6e267..1281eb5741 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit f501f6e26709877968425d63e1a6fdb9c43d4831 +Subproject commit 1281eb57411ef7a2b4269b310927f8cd8909ae4d From 27f17392bc8fe5287a1e1d820dea32f0524843a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 23:36:13 +0100 Subject: [PATCH 72/81] [Oztechan/Config#12] Update dependency com.huawei.hms:ads-prime to v3.4.67.300 (#2961) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f45c3c06c5..205dc49935 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -25,7 +25,7 @@ firebasePer = "20.5.0" firebasePerPlugin = "1.4.2" firebaseCrashlyticsPlugin = "2.9.9" googleAds = "22.5.0" -huaweiAds = "3.4.66.303" +huaweiAds = "3.4.67.300" huaweiOsm = "1.3.35" navigation = "2.7.5" playCore = "1.10.3" From 36443c8dfcd737550d07a6ecff59b371d726ebad Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 23:36:32 +0100 Subject: [PATCH 73/81] [Oztechan/Config#12] Update dependency com.codingfeline.buildkonfig to v0.15.0 (#2958) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 205dc49935..af50226d4d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ leakCanary = "2.12" sqlDelight = "1.5.5" lifecycle = "2.6.2" mokoResources = "0.23.0" -buildKonfig = "0.14.0" +buildKonfig = "0.15.0" splashScreen = "1.0.1" kover = "0.6.1" rootBeer = "0.1.0" From e10aa70a7e353f67be1611ff7756ce711d766b1f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:40:58 +0000 Subject: [PATCH 74/81] [Oztechan/Config#12] Update Git Submodules (#2965) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/basemob | 2 +- submodule/logmob | 2 +- submodule/parsermob | 2 +- submodule/scopemob | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/submodule/basemob b/submodule/basemob index 1281eb5741..9b3782c835 160000 --- a/submodule/basemob +++ b/submodule/basemob @@ -1 +1 @@ -Subproject commit 1281eb57411ef7a2b4269b310927f8cd8909ae4d +Subproject commit 9b3782c8356c9608745d9229ef98a1201edaa704 diff --git a/submodule/logmob b/submodule/logmob index 4eb0a462b7..6b83cf5070 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 4eb0a462b73c0bb89cccb9b86bc4e0229e1870d8 +Subproject commit 6b83cf507004bb7725e138dafe65c95262bf2510 diff --git a/submodule/parsermob b/submodule/parsermob index 591a977bd3..af65bdecbd 160000 --- a/submodule/parsermob +++ b/submodule/parsermob @@ -1 +1 @@ -Subproject commit 591a977bd3651d228c247c9aa6f452b3c58ba46d +Subproject commit af65bdecbda3f5435c5868568b4c72b596e7de8b diff --git a/submodule/scopemob b/submodule/scopemob index c80d26e86a..0a96a283ca 160000 --- a/submodule/scopemob +++ b/submodule/scopemob @@ -1 +1 @@ -Subproject commit c80d26e86ace353c489339ad299df682ff616b2c +Subproject commit 0a96a283cac42e0a1bf12659bc089db6994c377a From 19e3cc7dba845630a6e0e7cbcc94692c62e97a5c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:34:14 +0000 Subject: [PATCH 75/81] [Oztechan/Config#12] Lock file maintenance (#2966) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index a569b253f8..88ef720904 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -109,7 +109,7 @@ GEM fastlane-plugin-firebase_app_distribution (0.7.4) google-apis-firebaseappdistribution_v1 (~> 0.3.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.51.0) + google-apis-androidpublisher_v3 (0.52.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) @@ -195,7 +195,7 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.2) + unf_ext (0.0.9) unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) From 602851b12001f8cbc3802ebfe3184aee98d98811 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 16:11:12 +0100 Subject: [PATCH 76/81] [Oztechan/Config#12] Update dependency fastlane to v2.217.0 (#2968) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index 88ef720904..d60ce436bc 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,7 +8,7 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.848.0) + aws-partitions (1.850.0) aws-sdk-core (3.186.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -32,8 +32,7 @@ GEM declarative (0.0.20) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20231109) dotenv (2.8.1) emoji_regex (3.2.3) excon (0.104.0) @@ -66,7 +65,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.7) - fastlane (2.216.0) + fastlane (2.217.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -193,9 +192,6 @@ GEM tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.9) unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) From 958d961b7748ebfe76113e375f4d1e575e1e4327 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 23:21:17 +0100 Subject: [PATCH 77/81] [Oztechan/Config#12] Lock file maintenance (#2973) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- ios/Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock index d60ce436bc..d742d5e015 100644 --- a/ios/Gemfile.lock +++ b/ios/Gemfile.lock @@ -8,8 +8,8 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.850.0) - aws-sdk-core (3.186.0) + aws-partitions (1.853.0) + aws-sdk-core (3.187.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) @@ -17,7 +17,7 @@ GEM aws-sdk-kms (1.72.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.136.0) + aws-sdk-s3 (1.137.0) aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) @@ -108,7 +108,7 @@ GEM fastlane-plugin-firebase_app_distribution (0.7.4) google-apis-firebaseappdistribution_v1 (~> 0.3.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.52.0) + google-apis-androidpublisher_v3 (0.53.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) @@ -163,7 +163,7 @@ GEM optparse (0.1.1) os (1.1.4) plist (3.7.0) - public_suffix (5.0.3) + public_suffix (5.0.4) rake (13.1.0) representable (3.2.0) declarative (< 0.1.0) From f956149c8634655cc2b3e3f00086b0aa14a8bbce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:38:17 +0100 Subject: [PATCH 78/81] [Oztechan/Config#12] Update submodule/logmob digest to 4af3985 (#2974) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- submodule/logmob | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodule/logmob b/submodule/logmob index 6b83cf5070..4af3985d1a 160000 --- a/submodule/logmob +++ b/submodule/logmob @@ -1 +1 @@ -Subproject commit 6b83cf507004bb7725e138dafe65c95262bf2510 +Subproject commit 4af3985d1a49260e9b0ff3b860c5fd6ff53d0470 From 04dfa1be3ea47b5fe3626cd88baa20834f002e99 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:24:45 +0100 Subject: [PATCH 79/81] [Oztechan/Config#12] Update dependency com.google.firebase:firebase-perf-ktx to v20.5.1 (#2971) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index af50226d4d..bef66af2ad 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,7 @@ multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" firebaseRemoteConfig = "21.5.0" googleServices = "4.4.0" -firebasePer = "20.5.0" +firebasePer = "20.5.1" firebasePerPlugin = "1.4.2" firebaseCrashlyticsPlugin = "2.9.9" googleAds = "22.5.0" From a16744893540b765beb18d246b72cd72f308c6b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:25:00 +0100 Subject: [PATCH 80/81] [Oztechan/Config#12] Update dependency com.google.firebase:firebase-config-ktx to v21.6.0 (#2972) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bef66af2ad..d9926a094a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ koinKtor = "3.5.1" ktor = "2.3.6" multiplatformSettings = "1.1.0" firebaseAnalytics = "21.3.0" -firebaseRemoteConfig = "21.5.0" +firebaseRemoteConfig = "21.6.0" googleServices = "4.4.0" firebasePer = "20.5.1" firebasePerPlugin = "1.4.2" From 442f6cc7ae2f0c46a533b286869baeedba9be080 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:06:08 +0100 Subject: [PATCH 81/81] [Oztechan/Config#12] Update dependency androidx.activity:activity-compose to v1.8.1 (#2969) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mustafa Ozhan --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d9926a094a..adcaba1355 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ glance = "1.0.0" material3 = "1.1.2" androidDesugaring = "2.0.4" androidMaterial = "1.10.0" -composeActivity = "1.8.0" +composeActivity = "1.8.1" constraintLayout = "2.1.4" koinCore = "3.5.0" koinCompose = "3.5.0"