From 7a5ed4af9275c0717db98da66b9a71172681f4f7 Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Tue, 29 Aug 2023 08:59:39 +0700 Subject: [PATCH 1/7] [#29] Fix the make_ios script to be re-run multiple times continuously --- make.sh | 12 +++++++++--- make_ios.sh | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/make.sh b/make.sh index ce74af99..5d15689d 100755 --- a/make.sh +++ b/make.sh @@ -98,9 +98,8 @@ if ! [[ $minimum_ios_version =~ $version_regex ]]; then minimum_ios_version="14.0" fi +# Generate iOS module sh make_ios.sh -b ${bundle_id_production} -s ${bundle_id_staging} -n ${project_name} -iv ${minimum_ios_version} -rm -rf make_ios.sh -rm -rf make.sh # =====GENERATE ANDROID AND SHARED MODULES + REST OF COMPONENTS===== # TODO: Fully generate the KMM project later @@ -111,5 +110,12 @@ rsync -av \ --exclude '.git' \ --exclude '.gitmodules' \ --exclude 'make.sh' \ - --exclude './sample' \ + --exclude 'make_ios.sh' \ + --exclude '/sample' \ ./ sample/ + +# Reset all git submodules +cd ios +git add . +git reset --hard +cd .. diff --git a/make_ios.sh b/make_ios.sh index 9f0986d9..1fed861a 100644 --- a/make_ios.sh +++ b/make_ios.sh @@ -38,6 +38,11 @@ cd ios echo "=> Removing unnecessary files and folders" rm -rf {PROJECT_NAME}/sources/data +rm -rf ${project_name} +rm -rf ${project_name}.xcodeproj +rm -rf ${project_name}.xcworkspace +rm -rf ${project_name}KIFUITests +rm -rf ${project_name}Tests # Bypass this bug in iOS Template: https://github.com/nimblehq/ios-templates/issues/307 rm -f {PROJECT_NAME}KIFUITests/Sources/Specs/Application/ApplicationSpec.swift From 7307993c21a817f789fa0ceebbc8acdc9c020dea Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Fri, 25 Aug 2023 15:30:00 +0700 Subject: [PATCH 2/7] [#29] Refactor Android module dependencies in shared --- android/build.gradle.kts | 6 +-- ...roperties.sample => buildKonfig.properties | 0 buildSrc/src/main/java/BuildTypes.kt | 4 ++ buildSrc/src/main/java/Dependencies.kt | 44 +------------------ buildSrc/src/main/java/Flavors.kt | 5 +++ buildSrc/src/main/java/Modules.kt | 3 ++ .../java/{Configurations.kt => Plugins.kt} | 15 ------- buildSrc/src/main/java/Versions.kt | 42 ++++++++++++++++++ shared/build.gradle.kts | 6 +-- 9 files changed, 61 insertions(+), 64 deletions(-) rename buildKonfig.properties.sample => buildKonfig.properties (100%) create mode 100644 buildSrc/src/main/java/BuildTypes.kt create mode 100644 buildSrc/src/main/java/Flavors.kt create mode 100644 buildSrc/src/main/java/Modules.kt rename buildSrc/src/main/java/{Configurations.kt => Plugins.kt} (68%) create mode 100644 buildSrc/src/main/java/Versions.kt diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 48eaf086..4a0c03fc 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -10,11 +10,11 @@ val keystoreProperties = loadProperties("$rootDir/signing.properties") android { namespace = "co.nimblehq.kmm.template.android" - compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION + compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { applicationId = "co.nimblehq.kmm.template.android" - minSdk = Versions.ANDROID_MIN_SDK_VERSION - targetSdk = Versions.ANDROID_TARGET_SDK_VERSION + minSdk = Versions.ANDROID_MIN_SDK + targetSdk = Versions.ANDROID_TARGET_SDK versionCode = Versions.ANDROID_VERSION_CODE versionName = Versions.ANDROID_VERSION_NAME } diff --git a/buildKonfig.properties.sample b/buildKonfig.properties similarity index 100% rename from buildKonfig.properties.sample rename to buildKonfig.properties diff --git a/buildSrc/src/main/java/BuildTypes.kt b/buildSrc/src/main/java/BuildTypes.kt new file mode 100644 index 00000000..b0f59220 --- /dev/null +++ b/buildSrc/src/main/java/BuildTypes.kt @@ -0,0 +1,4 @@ +object BuildTypes { + const val DEBUG = "debug" + const val RELEASE = "release" +} diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 1f438c1c..f7ae174a 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -1,45 +1,3 @@ -object Versions { - const val ANDROID_COMPILE_SDK_VERSION = 33 - const val ANDROID_MIN_SDK_VERSION = 24 - const val ANDROID_TARGET_SDK_VERSION = 33 - const val ANDROID_VERSION_CODE = 1 - const val ANDROID_VERSION_NAME = "1.0.0" - const val ANDROIDX_ACTIVITY_COMPOSE = "1.7.1" - - const val BUILD_KONFIG = "0.13.3" - - const val COMPOSE = "1.4.3" - const val COMPOSE_COMPILER = "1.4.7" - const val COMPOSE_NAVIGATION = "2.6.0" - - const val DETEKT = "1.23.0" - - const val GRADLE = "8.0.2" - - const val JUNIT = "4.13.2" - - const val KOIN = "3.3.2" - const val KOIN_ANDROID = "3.3.2" - const val KOIN_ANDROIDX_COMPOSE = "3.4.1" - const val KOTLIN = "1.8.21" - const val KOTLIN_COROUTINES = "1.7.3" - const val KOTEST = "5.5.4" - const val KOTLINX_RESOURCES = "0.2.4" - const val KOVER = "0.7.3" - const val KSP = "1.8.21-1.0.11" - const val KTOR = "2.1.1" - - const val MOCKATIVE = "1.3.0" - const val MOCKK = "1.13.3" - - const val NAPIER = "2.6.1" - - const val ROBOLECTRIC = "4.9.1" - - const val TIMBER = "5.0.1" - const val TURBINE = "0.12.1" -} - object Dependencies { object AndroidX { @@ -94,7 +52,7 @@ object Dependencies { const val JUNIT = "junit:junit:${Versions.JUNIT}" - const val KOTEST_ASSERTIONS = "io.kotest:kotest-assertions-core:${Versions.KOTEST}" + const val KOTEST = "io.kotest:kotest-assertions-core:${Versions.KOTEST}" const val KOTLINX_RESOURCES = "com.goncalossilva:resources:${Versions.KOTLINX_RESOURCES}" const val MOCKATIVE = "io.mockative:mockative:${Versions.MOCKATIVE}" diff --git a/buildSrc/src/main/java/Flavors.kt b/buildSrc/src/main/java/Flavors.kt new file mode 100644 index 00000000..9e7697c2 --- /dev/null +++ b/buildSrc/src/main/java/Flavors.kt @@ -0,0 +1,5 @@ +object Flavors { + const val PRODUCTION = "production" + const val STAGING = "staging" + const val DIMENSION_VERSION = "version" +} diff --git a/buildSrc/src/main/java/Modules.kt b/buildSrc/src/main/java/Modules.kt new file mode 100644 index 00000000..31ed7a11 --- /dev/null +++ b/buildSrc/src/main/java/Modules.kt @@ -0,0 +1,3 @@ +object Modules { + const val SHARED = ":shared" +} diff --git a/buildSrc/src/main/java/Configurations.kt b/buildSrc/src/main/java/Plugins.kt similarity index 68% rename from buildSrc/src/main/java/Configurations.kt rename to buildSrc/src/main/java/Plugins.kt index 197f0a3c..671a93ab 100644 --- a/buildSrc/src/main/java/Configurations.kt +++ b/buildSrc/src/main/java/Plugins.kt @@ -1,18 +1,3 @@ -object Flavors { - const val PRODUCTION = "production" - const val STAGING = "staging" - const val DIMENSION_VERSION = "version" -} - -object BuildTypes { - const val DEBUG = "debug" - const val RELEASE = "release" -} - -object Modules { - const val SHARED = ":shared" -} - object Plugins { const val ANDROID = "android" const val ANDROID_APPLICATION = "com.android.application" diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt new file mode 100644 index 00000000..2bfae497 --- /dev/null +++ b/buildSrc/src/main/java/Versions.kt @@ -0,0 +1,42 @@ +object Versions { + const val ANDROID_COMPILE_SDK = 33 + const val ANDROID_MIN_SDK = 24 + const val ANDROID_TARGET_SDK = 33 + const val ANDROID_VERSION_CODE = 1 + const val ANDROID_VERSION_NAME = "1.0.0" + + const val ANDROIDX_ACTIVITY_COMPOSE = "1.7.1" + + const val BUILD_KONFIG = "0.13.3" + + const val COMPOSE = "1.4.3" + const val COMPOSE_COMPILER = "1.4.7" + const val COMPOSE_NAVIGATION = "2.6.0" + + const val DETEKT = "1.23.0" + + const val GRADLE = "8.0.2" + + const val JUNIT = "4.13.2" + + const val KOIN = "3.3.2" + const val KOIN_ANDROID = "3.3.2" + const val KOIN_ANDROIDX_COMPOSE = "3.4.1" + const val KOTLIN = "1.8.21" + const val KOTLIN_COROUTINES = "1.7.3" + const val KOTEST = "5.5.4" + const val KOTLINX_RESOURCES = "0.2.4" + const val KOVER = "0.7.3" + const val KSP = "1.8.21-1.0.11" + const val KTOR = "2.1.1" + + const val MOCKATIVE = "1.3.0" + const val MOCKK = "1.13.3" + + const val NAPIER = "2.6.1" + + const val ROBOLECTRIC = "4.9.1" + + const val TIMBER = "5.0.1" + const val TURBINE = "0.12.1" +} diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index d05b7982..b9cca8ba 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -67,7 +67,7 @@ kotlin { implementation(kotlin("test")) with(Dependencies.Test) { implementation(COROUTINES) - implementation(KOTEST_ASSERTIONS) + implementation(KOTEST) implementation(KOTLINX_RESOURCES) implementation(MOCKATIVE) implementation(TURBINE) @@ -114,9 +114,9 @@ ksp { android { namespace = "co.nimblehq.kmm.template" - compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION + compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { - minSdk = Versions.ANDROID_MIN_SDK_VERSION + minSdk = Versions.ANDROID_MIN_SDK } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 From ba7e14f3af70cdc3435eb70e3a78035b495a788c Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Mon, 28 Aug 2023 23:03:09 +0700 Subject: [PATCH 3/7] [#29] Correct component names & packages in shared module --- .../remote/datasources/RemoteDataSource.kt | 16 ++++++++++++++ .../datasources/UserRemoteDataSource.kt | 16 -------------- .../{UserResponse.kt => Response.kt} | 6 ++--- .../data/repositories/RepositoryImpl.kt | 10 ++++----- .../kmm/template/di/module/RemoteModule.kt | 6 ++--- .../kmm/template/di/module/UseCaseModule.kt | 6 ++--- .../kmm/template/domain/model/UserModel.kt | 5 ----- .../kmm/template/domain/models/Model.kt | 5 +++++ .../domain/repositories/Repository.kt | 4 ++-- .../domain/usecases/GetUsersUseCase.kt | 14 ------------ .../kmm/template/domain/usecases/UseCase.kt | 14 ++++++++++++ .../data/repositories/RepositoryTest.kt | 22 +++++++++---------- ...{GetUsersUseCaseTest.kt => UseCaseTest.kt} | 16 +++++++------- .../extensions/ResponseMappingTest.kt | 6 ++--- .../co/nimblehq/kmm/template/util/Fake.kt | 8 +++---- 15 files changed, 77 insertions(+), 77 deletions(-) create mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt delete mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/{UserResponse.kt => Response.kt} (61%) delete mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt create mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt delete mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt create mode 100644 shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt rename shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/{GetUsersUseCaseTest.kt => UseCaseTest.kt} (71%) diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt new file mode 100644 index 00000000..a54d5d7b --- /dev/null +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt @@ -0,0 +1,16 @@ +package co.nimblehq.kmm.template.data.remote.datasources + +import co.nimblehq.kmm.template.data.remote.model.responses.Response +import co.nimblehq.kmm.template.data.remote.ApiClient + +interface RemoteDataSource { + suspend fun getUsers(): List +} + +internal class RemoteDataSourceImpl(private val apiClient: ApiClient) : RemoteDataSource { + override suspend fun getUsers(): List { + return apiClient.get( + path = "users" + ) + } +} diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt deleted file mode 100644 index 04e404d4..00000000 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt +++ /dev/null @@ -1,16 +0,0 @@ -package co.nimblehq.kmm.template.data.remote.datasources - -import co.nimblehq.kmm.template.data.remote.model.responses.UserResponse -import co.nimblehq.kmm.template.data.remote.ApiClient - -interface UserRemoteDataSource { - suspend fun getUsers(): List -} - -internal class UserRemoteDataSourceImpl(private val apiClient: ApiClient) : UserRemoteDataSource { - override suspend fun getUsers(): List { - return apiClient.get( - path = "users" - ) - } -} diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt similarity index 61% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt index 2536f150..a3ac6a2c 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt @@ -1,12 +1,12 @@ package co.nimblehq.kmm.template.data.remote.model.responses -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class UserResponse( +data class Response( @SerialName("id") val id: Int? ) -fun UserResponse.toModel() = UserModel(id) +fun Response.toModel() = Model(id) diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt index eb4bae32..478086c3 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt @@ -1,16 +1,16 @@ package co.nimblehq.kmm.template.data.repositories import co.nimblehq.kmm.template.data.extensions.flowTransform -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource import co.nimblehq.kmm.template.data.remote.model.responses.toModel -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import co.nimblehq.kmm.template.domain.repositories.Repository import kotlinx.coroutines.flow.Flow class RepositoryImpl( - private val userRemoteDataSource: UserRemoteDataSource + private val remoteDataSource: RemoteDataSource ) : Repository { - override fun getUsers(): Flow> = flowTransform { - userRemoteDataSource.getUsers().map { it.toModel() } + override fun getUsers(): Flow> = flowTransform { + remoteDataSource.getUsers().map { it.toModel() } } } diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt index da79f2ed..5e6fa6dd 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt @@ -1,13 +1,13 @@ package co.nimblehq.kmm.template.di.module -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource import org.koin.dsl.module import co.nimblehq.kmm.template.data.remote.ApiClient -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSourceImpl +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSourceImpl import org.koin.core.module.dsl.singleOf import org.koin.dsl.bind val remoteModule = module { singleOf(::ApiClient) - singleOf(::UserRemoteDataSourceImpl) bind UserRemoteDataSource::class + singleOf(::RemoteDataSourceImpl) bind RemoteDataSource::class } diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt index e645c1ea..7320d0bb 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt @@ -2,10 +2,10 @@ package co.nimblehq.kmm.template.di.module import org.koin.core.module.dsl.singleOf import org.koin.dsl.module -import co.nimblehq.kmm.template.domain.usecases.GetUsersUseCaseImpl -import co.nimblehq.kmm.template.domain.usecases.GetUsersUseCase +import co.nimblehq.kmm.template.domain.usecases.UseCaseImpl +import co.nimblehq.kmm.template.domain.usecases.UseCase import org.koin.dsl.bind val useCaseModule = module { - singleOf(::GetUsersUseCaseImpl) bind GetUsersUseCase::class + singleOf(::UseCaseImpl) bind UseCase::class } diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt deleted file mode 100644 index f017aaab..00000000 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt +++ /dev/null @@ -1,5 +0,0 @@ -package co.nimblehq.kmm.template.domain.model - -data class UserModel( - val id: Int? -) diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt new file mode 100644 index 00000000..0155513c --- /dev/null +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt @@ -0,0 +1,5 @@ +package co.nimblehq.kmm.template.domain.models + +data class Model( + val id: Int? +) diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt index e93a5052..319e5f02 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt @@ -1,8 +1,8 @@ package co.nimblehq.kmm.template.domain.repositories -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import kotlinx.coroutines.flow.Flow interface Repository { - fun getUsers(): Flow> + fun getUsers(): Flow> } diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt deleted file mode 100644 index 59bb3dfb..00000000 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt +++ /dev/null @@ -1,14 +0,0 @@ -package co.nimblehq.kmm.template.domain.usecases - -import co.nimblehq.kmm.template.domain.model.UserModel -import co.nimblehq.kmm.template.domain.repositories.Repository -import kotlinx.coroutines.flow.Flow - -interface GetUsersUseCase { - operator fun invoke(): Flow> -} - -class GetUsersUseCaseImpl(private val repository: Repository) : GetUsersUseCase { - - override fun invoke(): Flow> = repository.getUsers() -} diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt new file mode 100644 index 00000000..4f8641a5 --- /dev/null +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt @@ -0,0 +1,14 @@ +package co.nimblehq.kmm.template.domain.usecases + +import co.nimblehq.kmm.template.domain.models.Model +import co.nimblehq.kmm.template.domain.repositories.Repository +import kotlinx.coroutines.flow.Flow + +interface UseCase { + operator fun invoke(): Flow> +} + +class UseCaseImpl(private val repository: Repository) : UseCase { + + override fun invoke(): Flow> = repository.getUsers() +} diff --git a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt index 9ec12565..44592df9 100644 --- a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt +++ b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt @@ -1,10 +1,10 @@ package co.nimblehq.kmm.template.data.repositories import app.cash.turbine.test -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource import co.nimblehq.kmm.template.domain.repositories.Repository -import co.nimblehq.kmm.template.util.Fake.user -import co.nimblehq.kmm.template.util.Fake.userResponse +import co.nimblehq.kmm.template.util.Fake.model +import co.nimblehq.kmm.template.util.Fake.response import io.kotest.matchers.shouldBe import io.mockative.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -16,24 +16,24 @@ import kotlin.test.Test class RepositoryTest { @Mock - private val mockUserRemoteDataSource = mock(UserRemoteDataSource::class) + private val mockRemoteDataSource = mock(RemoteDataSource::class) private lateinit var repository: Repository @BeforeTest fun setup() { - repository = RepositoryImpl(mockUserRemoteDataSource) + repository = RepositoryImpl(mockRemoteDataSource) } @Test fun `when calling getUsers successfully - it returns users`() = runTest { - given(mockUserRemoteDataSource) - .suspendFunction(mockUserRemoteDataSource::getUsers) + given(mockRemoteDataSource) + .suspendFunction(mockRemoteDataSource::getUsers) .whenInvoked() - .thenReturn(listOf(userResponse)) + .thenReturn(listOf(response)) repository.getUsers().test { - awaitItem() shouldBe listOf(user) + awaitItem() shouldBe listOf(model) awaitComplete() } } @@ -41,8 +41,8 @@ class RepositoryTest { @Test fun `when calling getUsers fails - it throws the corresponding error`() = runTest { val throwable = Throwable() - given(mockUserRemoteDataSource) - .suspendFunction(mockUserRemoteDataSource::getUsers) + given(mockRemoteDataSource) + .suspendFunction(mockRemoteDataSource::getUsers) .whenInvoked() .thenThrow(throwable) diff --git a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt similarity index 71% rename from shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt rename to shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt index e8ec632b..79549421 100644 --- a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt +++ b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt @@ -2,7 +2,7 @@ package co.nimblehq.kmm.template.domain.usecases import app.cash.turbine.test import co.nimblehq.kmm.template.domain.repositories.Repository -import co.nimblehq.kmm.template.util.Fake.user +import co.nimblehq.kmm.template.util.Fake.model import io.kotest.matchers.shouldBe import io.mockative.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -13,33 +13,33 @@ import kotlin.test.BeforeTest import kotlin.test.Test @ExperimentalCoroutinesApi -class GetUsersUseCaseTest { +class UseCaseTest { @Mock private val mockRepository: Repository = mock(Repository::class) - private lateinit var useCase: GetUsersUseCase + private lateinit var useCase: UseCase @BeforeTest fun setUp() { - useCase = GetUsersUseCaseImpl(mockRepository) + useCase = UseCaseImpl(mockRepository) } @Test - fun `When calling getUsers successfully - it returns users`() = runTest { + fun `When calling successfully - it returns users`() = runTest { given(mockRepository) .function(mockRepository::getUsers) .whenInvoked() - .thenReturn(flowOf(listOf(user))) + .thenReturn(flowOf(listOf(model))) useCase().test { - awaitItem() shouldBe listOf(user) + awaitItem() shouldBe listOf(model) awaitComplete() } } @Test - fun `when calling getUsers fails - it throws the corresponding error`() = runTest { + fun `when calling fails - it throws the corresponding error`() = runTest { val throwable = Throwable() given(mockRepository) .function(mockRepository::getUsers) diff --git a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt index dc370775..6346d0b9 100644 --- a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt +++ b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt @@ -2,7 +2,7 @@ package co.nimblehq.kmm.template.extensions import app.cash.turbine.test import co.nimblehq.kmm.template.data.extensions.flowTransform -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import io.kotest.matchers.shouldBe import io.ktor.utils.io.errors.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -14,7 +14,7 @@ class ResponseMappingTest { @Test fun `When mapping API request flow failed with Exception - it returns Exception error`() = runTest { - flowTransform { + flowTransform { throw Exception() }.test { awaitError() shouldBe Exception() @@ -24,7 +24,7 @@ class ResponseMappingTest { @Test fun `When mapping API request flow failed with a generic error - it returns that error`() = runTest { val error = IOException("no internet") - flowTransform { + flowTransform { throw error }.test { awaitError() shouldBe error diff --git a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt index 5c4fa937..0f367d15 100644 --- a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt +++ b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt @@ -1,11 +1,11 @@ package co.nimblehq.kmm.template.util -import co.nimblehq.kmm.template.data.remote.model.responses.UserResponse -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.data.remote.model.responses.Response +import co.nimblehq.kmm.template.domain.models.Model object Fake { - val user = UserModel(id = 0) + val model = Model(id = 0) - val userResponse = UserResponse(id = 0) + val response = Response(id = 0) } From 365405ae0e7e45ed4a79c168ded5fe8764d2357a Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Tue, 29 Aug 2023 10:08:32 +0700 Subject: [PATCH 4/7] [#29] Rename package module > modules, model > models --- .../kmm/template/di/{module => modules}/PlatformModule.kt | 2 +- .../kmm/template/data/remote/datasources/RemoteDataSource.kt | 2 +- .../data/remote/{model => models}/responses/Response.kt | 2 +- .../nimblehq/kmm/template/data/repositories/RepositoryImpl.kt | 2 +- .../src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt | 2 +- .../kmm/template/di/{module => modules}/PlatformModule.kt | 2 +- .../kmm/template/di/{module => modules}/RemoteModule.kt | 2 +- .../kmm/template/di/{module => modules}/RepositoryModule.kt | 2 +- .../kmm/template/di/{module => modules}/UseCaseModule.kt | 2 +- .../src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt | 2 +- .../kmm/template/di/{module => modules}/PlatformModule.kt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) rename shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (81%) rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/{model => models}/responses/Response.kt (79%) rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (62%) rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/RemoteModule.kt (90%) rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/RepositoryModule.kt (87%) rename shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/UseCaseModule.kt (86%) rename shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (80%) diff --git a/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 81% rename from shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index 3320a9b8..78fdf537 100644 --- a/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import io.ktor.client.engine.android.Android import org.koin.core.module.Module diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt index a54d5d7b..40d0d5f0 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt @@ -1,6 +1,6 @@ package co.nimblehq.kmm.template.data.remote.datasources -import co.nimblehq.kmm.template.data.remote.model.responses.Response +import co.nimblehq.kmm.template.data.remote.models.responses.Response import co.nimblehq.kmm.template.data.remote.ApiClient interface RemoteDataSource { diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt similarity index 79% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt index a3ac6a2c..ab0421b4 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/Response.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.data.remote.model.responses +package co.nimblehq.kmm.template.data.remote.models.responses import co.nimblehq.kmm.template.domain.models.Model import kotlinx.serialization.SerialName diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt index 478086c3..bd541db4 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt @@ -2,7 +2,7 @@ package co.nimblehq.kmm.template.data.repositories import co.nimblehq.kmm.template.data.extensions.flowTransform import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource -import co.nimblehq.kmm.template.data.remote.model.responses.toModel +import co.nimblehq.kmm.template.data.remote.models.responses.toModel import co.nimblehq.kmm.template.domain.models.Model import co.nimblehq.kmm.template.domain.repositories.Repository import kotlinx.coroutines.flow.Flow diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt index ab8c8bb2..7d254713 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt @@ -1,6 +1,6 @@ package co.nimblehq.kmm.template.di -import co.nimblehq.kmm.template.di.module.* +import co.nimblehq.kmm.template.di.modules.* import org.koin.core.KoinApplication import org.koin.core.context.startKoin import org.koin.dsl.KoinAppDeclaration diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 62% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index c9f61890..1964f8f3 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import org.koin.core.module.Module diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt similarity index 90% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt index 5e6fa6dd..3db63691 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource import org.koin.dsl.module diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt similarity index 87% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt index 60ff81ce..5d844744 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import org.koin.core.module.dsl.singleOf import org.koin.dsl.module diff --git a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt similarity index 86% rename from shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt rename to shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt index 7320d0bb..45ea8790 100644 --- a/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt +++ b/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import org.koin.core.module.dsl.singleOf import org.koin.dsl.module diff --git a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt index 0f367d15..da1094a8 100644 --- a/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt +++ b/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt @@ -1,6 +1,6 @@ package co.nimblehq.kmm.template.util -import co.nimblehq.kmm.template.data.remote.model.responses.Response +import co.nimblehq.kmm.template.data.remote.models.responses.Response import co.nimblehq.kmm.template.domain.models.Model object Fake { diff --git a/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 80% rename from shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index 6b9b4ecd..f08cecbb 100644 --- a/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import io.ktor.client.engine.darwin.Darwin import org.koin.core.module.Module From 2476689a9f5c1bc623d07921332919e4fa281ca3 Mon Sep 17 00:00:00 2001 From: team-nimblehq Date: Tue, 29 Aug 2023 03:15:50 +0000 Subject: [PATCH 5/7] [Chore] Generate & update sample project --- sample/android/build.gradle.kts | 6 +- sample/buildKonfig.properties.sample | 4 - sample/buildSrc/src/main/java/BuildTypes.kt | 4 + sample/buildSrc/src/main/java/Dependencies.kt | 44 +--- sample/buildSrc/src/main/java/Flavors.kt | 5 + sample/buildSrc/src/main/java/Modules.kt | 3 + .../java/{Configurations.kt => Plugins.kt} | 15 -- sample/buildSrc/src/main/java/Versions.kt | 42 ++++ sample/ios/sample.xcodeproj/project.pbxproj | 214 +++++++++--------- sample/shared/build.gradle.kts | 6 +- .../di/{module => modules}/PlatformModule.kt | 2 +- .../remote/datasources/RemoteDataSource.kt | 16 ++ .../datasources/UserRemoteDataSource.kt | 16 -- .../remote/model/responses/UserResponse.kt | 12 - .../data/remote/models/responses/Response.kt | 12 + .../data/repositories/RepositoryImpl.kt | 12 +- .../co/nimblehq/kmm/template/di/Koin.kt | 2 +- .../kmm/template/di/module/RemoteModule.kt | 13 -- .../kmm/template/di/module/UseCaseModule.kt | 11 - .../di/{module => modules}/PlatformModule.kt | 2 +- .../kmm/template/di/modules/RemoteModule.kt | 13 ++ .../{module => modules}/RepositoryModule.kt | 2 +- .../kmm/template/di/modules/UseCaseModule.kt | 11 + .../kmm/template/domain/model/UserModel.kt | 5 - .../kmm/template/domain/models/Model.kt | 5 + .../domain/repositories/Repository.kt | 4 +- .../domain/usecases/GetUsersUseCase.kt | 14 -- .../kmm/template/domain/usecases/UseCase.kt | 14 ++ .../data/repositories/RepositoryTest.kt | 22 +- ...{GetUsersUseCaseTest.kt => UseCaseTest.kt} | 16 +- .../extensions/ResponseMappingTest.kt | 6 +- .../co/nimblehq/kmm/template/util/Fake.kt | 8 +- .../di/{module => modules}/PlatformModule.kt | 2 +- 33 files changed, 278 insertions(+), 285 deletions(-) delete mode 100644 sample/buildKonfig.properties.sample create mode 100644 sample/buildSrc/src/main/java/BuildTypes.kt create mode 100644 sample/buildSrc/src/main/java/Flavors.kt create mode 100644 sample/buildSrc/src/main/java/Modules.kt rename sample/buildSrc/src/main/java/{Configurations.kt => Plugins.kt} (68%) create mode 100644 sample/buildSrc/src/main/java/Versions.kt rename sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (81%) create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt rename sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (62%) create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt rename sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/RepositoryModule.kt (87%) create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt delete mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt create mode 100644 sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt rename sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/{GetUsersUseCaseTest.kt => UseCaseTest.kt} (71%) rename sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/{module => modules}/PlatformModule.kt (80%) diff --git a/sample/android/build.gradle.kts b/sample/android/build.gradle.kts index 48eaf086..4a0c03fc 100644 --- a/sample/android/build.gradle.kts +++ b/sample/android/build.gradle.kts @@ -10,11 +10,11 @@ val keystoreProperties = loadProperties("$rootDir/signing.properties") android { namespace = "co.nimblehq.kmm.template.android" - compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION + compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { applicationId = "co.nimblehq.kmm.template.android" - minSdk = Versions.ANDROID_MIN_SDK_VERSION - targetSdk = Versions.ANDROID_TARGET_SDK_VERSION + minSdk = Versions.ANDROID_MIN_SDK + targetSdk = Versions.ANDROID_TARGET_SDK versionCode = Versions.ANDROID_VERSION_CODE versionName = Versions.ANDROID_VERSION_NAME } diff --git a/sample/buildKonfig.properties.sample b/sample/buildKonfig.properties.sample deleted file mode 100644 index 9238fa78..00000000 --- a/sample/buildKonfig.properties.sample +++ /dev/null @@ -1,4 +0,0 @@ -# Staging env -STAGING_BASE_URL= -# Production env -PRODUCTION_BASE_URL= diff --git a/sample/buildSrc/src/main/java/BuildTypes.kt b/sample/buildSrc/src/main/java/BuildTypes.kt new file mode 100644 index 00000000..b0f59220 --- /dev/null +++ b/sample/buildSrc/src/main/java/BuildTypes.kt @@ -0,0 +1,4 @@ +object BuildTypes { + const val DEBUG = "debug" + const val RELEASE = "release" +} diff --git a/sample/buildSrc/src/main/java/Dependencies.kt b/sample/buildSrc/src/main/java/Dependencies.kt index 1f438c1c..f7ae174a 100644 --- a/sample/buildSrc/src/main/java/Dependencies.kt +++ b/sample/buildSrc/src/main/java/Dependencies.kt @@ -1,45 +1,3 @@ -object Versions { - const val ANDROID_COMPILE_SDK_VERSION = 33 - const val ANDROID_MIN_SDK_VERSION = 24 - const val ANDROID_TARGET_SDK_VERSION = 33 - const val ANDROID_VERSION_CODE = 1 - const val ANDROID_VERSION_NAME = "1.0.0" - const val ANDROIDX_ACTIVITY_COMPOSE = "1.7.1" - - const val BUILD_KONFIG = "0.13.3" - - const val COMPOSE = "1.4.3" - const val COMPOSE_COMPILER = "1.4.7" - const val COMPOSE_NAVIGATION = "2.6.0" - - const val DETEKT = "1.23.0" - - const val GRADLE = "8.0.2" - - const val JUNIT = "4.13.2" - - const val KOIN = "3.3.2" - const val KOIN_ANDROID = "3.3.2" - const val KOIN_ANDROIDX_COMPOSE = "3.4.1" - const val KOTLIN = "1.8.21" - const val KOTLIN_COROUTINES = "1.7.3" - const val KOTEST = "5.5.4" - const val KOTLINX_RESOURCES = "0.2.4" - const val KOVER = "0.7.3" - const val KSP = "1.8.21-1.0.11" - const val KTOR = "2.1.1" - - const val MOCKATIVE = "1.3.0" - const val MOCKK = "1.13.3" - - const val NAPIER = "2.6.1" - - const val ROBOLECTRIC = "4.9.1" - - const val TIMBER = "5.0.1" - const val TURBINE = "0.12.1" -} - object Dependencies { object AndroidX { @@ -94,7 +52,7 @@ object Dependencies { const val JUNIT = "junit:junit:${Versions.JUNIT}" - const val KOTEST_ASSERTIONS = "io.kotest:kotest-assertions-core:${Versions.KOTEST}" + const val KOTEST = "io.kotest:kotest-assertions-core:${Versions.KOTEST}" const val KOTLINX_RESOURCES = "com.goncalossilva:resources:${Versions.KOTLINX_RESOURCES}" const val MOCKATIVE = "io.mockative:mockative:${Versions.MOCKATIVE}" diff --git a/sample/buildSrc/src/main/java/Flavors.kt b/sample/buildSrc/src/main/java/Flavors.kt new file mode 100644 index 00000000..9e7697c2 --- /dev/null +++ b/sample/buildSrc/src/main/java/Flavors.kt @@ -0,0 +1,5 @@ +object Flavors { + const val PRODUCTION = "production" + const val STAGING = "staging" + const val DIMENSION_VERSION = "version" +} diff --git a/sample/buildSrc/src/main/java/Modules.kt b/sample/buildSrc/src/main/java/Modules.kt new file mode 100644 index 00000000..31ed7a11 --- /dev/null +++ b/sample/buildSrc/src/main/java/Modules.kt @@ -0,0 +1,3 @@ +object Modules { + const val SHARED = ":shared" +} diff --git a/sample/buildSrc/src/main/java/Configurations.kt b/sample/buildSrc/src/main/java/Plugins.kt similarity index 68% rename from sample/buildSrc/src/main/java/Configurations.kt rename to sample/buildSrc/src/main/java/Plugins.kt index 197f0a3c..671a93ab 100644 --- a/sample/buildSrc/src/main/java/Configurations.kt +++ b/sample/buildSrc/src/main/java/Plugins.kt @@ -1,18 +1,3 @@ -object Flavors { - const val PRODUCTION = "production" - const val STAGING = "staging" - const val DIMENSION_VERSION = "version" -} - -object BuildTypes { - const val DEBUG = "debug" - const val RELEASE = "release" -} - -object Modules { - const val SHARED = ":shared" -} - object Plugins { const val ANDROID = "android" const val ANDROID_APPLICATION = "com.android.application" diff --git a/sample/buildSrc/src/main/java/Versions.kt b/sample/buildSrc/src/main/java/Versions.kt new file mode 100644 index 00000000..2bfae497 --- /dev/null +++ b/sample/buildSrc/src/main/java/Versions.kt @@ -0,0 +1,42 @@ +object Versions { + const val ANDROID_COMPILE_SDK = 33 + const val ANDROID_MIN_SDK = 24 + const val ANDROID_TARGET_SDK = 33 + const val ANDROID_VERSION_CODE = 1 + const val ANDROID_VERSION_NAME = "1.0.0" + + const val ANDROIDX_ACTIVITY_COMPOSE = "1.7.1" + + const val BUILD_KONFIG = "0.13.3" + + const val COMPOSE = "1.4.3" + const val COMPOSE_COMPILER = "1.4.7" + const val COMPOSE_NAVIGATION = "2.6.0" + + const val DETEKT = "1.23.0" + + const val GRADLE = "8.0.2" + + const val JUNIT = "4.13.2" + + const val KOIN = "3.3.2" + const val KOIN_ANDROID = "3.3.2" + const val KOIN_ANDROIDX_COMPOSE = "3.4.1" + const val KOTLIN = "1.8.21" + const val KOTLIN_COROUTINES = "1.7.3" + const val KOTEST = "5.5.4" + const val KOTLINX_RESOURCES = "0.2.4" + const val KOVER = "0.7.3" + const val KSP = "1.8.21-1.0.11" + const val KTOR = "2.1.1" + + const val MOCKATIVE = "1.3.0" + const val MOCKK = "1.13.3" + + const val NAPIER = "2.6.1" + + const val ROBOLECTRIC = "4.9.1" + + const val TIMBER = "5.0.1" + const val TURBINE = "0.12.1" +} diff --git a/sample/ios/sample.xcodeproj/project.pbxproj b/sample/ios/sample.xcodeproj/project.pbxproj index 1a0f016a..b5e770f6 100644 --- a/sample/ios/sample.xcodeproj/project.pbxproj +++ b/sample/ios/sample.xcodeproj/project.pbxproj @@ -15,7 +15,9 @@ 33209CEB34C04BC32D0FFDD4 /* UseCaseFactoryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA52B4C8C3AF1CB2181C14D /* UseCaseFactoryProtocol.swift */; }; 3559AC5988194A4701902F80 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = 302BB730B8D0BF901FF489B6 /* .gitkeep */; }; 53157A77A8B802D108AE9D73 /* Typealiases.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5B819017A28FE15B242BB5B /* Typealiases.swift */; }; + 629475533046B80D46AFBF00 /* Pods_sample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 103410355FEB204A3E584E03 /* Pods_sample.framework */; }; 66C817ACCA7CE15ABF58BC06 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD1568B768046A18E011F2C /* HomeViewController.swift */; }; + 6D46BAB1604A07B6D3241779 /* Pods_sample_sampleKIFUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 719767D90ACE9AF96B8F661D /* Pods_sample_sampleKIFUITests.framework */; }; 701258D40CE69EC8168A3D12 /* AutoMockable.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBF1B234787FCD92142B105D /* AutoMockable.generated.swift */; }; 7CF0F8933FB47F5D003383AA /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = 41210B648761A8DC4ABD3BB9 /* .gitkeep */; }; 7ED0E12DA355DEE8EED0B614 /* Color+Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = A29F97F67192DE9B66E872E6 /* Color+Application.swift */; }; @@ -23,14 +25,12 @@ 8A43095CEA3F4C83584AB199 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = 05F57F86A37A0E0B6CC54CB4 /* .gitkeep */; }; 9726C56684473F7E78415A58 /* Navigator+Scene.swift in Sources */ = {isa = PBXBuildFile; fileRef = A64B0E7B034D526205048030 /* Navigator+Scene.swift */; }; 9ACA6A5E938E3365302C3749 /* Navigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C159B27C88C08E8AEB22AFD4 /* Navigator.swift */; }; - 9B572CAD82F5648A06EF0314 /* Pods_sample_sampleKIFUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03BEA10CB7B6DEE29A61CC9B /* Pods_sample_sampleKIFUITests.framework */; }; - B8C7DBD0EBB8E47F77D77A39 /* Pods_sampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7BF6B31569F36BD756160D7 /* Pods_sampleTests.framework */; }; + B64808A990DDFE59C437CC25 /* Pods_sampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 457D558538D15BD9C5450B40 /* Pods_sampleTests.framework */; }; BA754F29AB917D745895322D /* Constants+API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222B1BD9F71FF1797F160231 /* Constants+API.swift */; }; C152F2B63E42238BE4F20592 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F5C2293A2DB24CDCA81957 /* Constants.swift */; }; CA324314BE7318252E4D5D62 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6952456309E29C9609D23B3F /* LaunchScreen.storyboard */; }; D609A7DCE8B3E7A49CFACC2E /* Navigator+Transition.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9816C413C0D0DD7B01BA9CE /* Navigator+Transition.swift */; }; DE665FDD6164065A881A2F44 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = 67C0EA707F4FBB459FEBA640 /* .gitkeep */; }; - DF61A00144BEDB597677AFAB /* Pods_sample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8B93967CC161BAE88D7E6 /* Pods_sample.framework */; }; F444409E14F8ED6BF6A2666A /* KIF+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFAE58D40BFE459B1184D994 /* KIF+Swift.swift */; }; F858855AD6392D182B853A79 /* Optional+Unwrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562EF605C844B951CD47F38D /* Optional+Unwrap.swift */; }; /* End PBXBuildFile section */ @@ -86,47 +86,47 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 01B45E2C9F888E5269388564 /* Pods-sampleTests.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.debug staging.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.debug staging.xcconfig"; sourceTree = ""; }; - 03BEA10CB7B6DEE29A61CC9B /* Pods_sample_sampleKIFUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sample_sampleKIFUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 03A3630DEE50F53400BA4B19 /* Pods-sample-sampleKIFUITests.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.release production.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.release production.xcconfig"; sourceTree = ""; }; 04B8796D7472561BF8EB10A1 /* DebugProduction.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugProduction.xcconfig; sourceTree = ""; }; 05F57F86A37A0E0B6CC54CB4 /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; + 103410355FEB204A3E584E03 /* Pods_sample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 18C176717B282B7A8842FC73 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 1EEB8F8EE4393D2D9AC51316 /* R.generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = R.generated.swift; sourceTree = ""; }; 222B1BD9F71FF1797F160231 /* Constants+API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Constants+API.swift"; sourceTree = ""; }; 302BB730B8D0BF901FF489B6 /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; + 32B388D0C550ECB5FA455EEE /* Pods-sampleTests.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.release production.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.release production.xcconfig"; sourceTree = ""; }; + 35E2DAC9B94DA53C7E3683A6 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.debug staging.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.debug staging.xcconfig"; sourceTree = ""; }; + 37D6479155B7CB6113411C9F /* Pods-sample.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.release production.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.release production.xcconfig"; sourceTree = ""; }; 41210B648761A8DC4ABD3BB9 /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; 414B86B12605C252A692EA37 /* sampleKIFUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = sampleKIFUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 44331CC8E4C1C49B1BE0E896 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.release staging.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.release staging.xcconfig"; sourceTree = ""; }; + 457D558538D15BD9C5450B40 /* Pods_sampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 562EF605C844B951CD47F38D /* Optional+Unwrap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Optional+Unwrap.swift"; sourceTree = ""; }; - 5E2F732FE10206795FDF97A0 /* Pods-sample-sampleKIFUITests.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.release production.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.release production.xcconfig"; sourceTree = ""; }; + 5E7B8A83E0D97844A07CFB33 /* Pods-sampleTests.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.debug staging.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.debug staging.xcconfig"; sourceTree = ""; }; 6432B427D5097BCF75C4B15E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 67C0EA707F4FBB459FEBA640 /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; - 6881636BF664E9935E20AD46 /* Pods-sample.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.debug staging.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.debug staging.xcconfig"; sourceTree = ""; }; 6952456309E29C9609D23B3F /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; - 6DAF1A76B695970472FE8753 /* Pods-sampleTests.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.release production.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.release production.xcconfig"; sourceTree = ""; }; + 719767D90ACE9AF96B8F661D /* Pods_sample_sampleKIFUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sample_sampleKIFUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 82F5C2293A2DB24CDCA81957 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 840F9001316ABA7052841819 /* Pods-sample-sampleKIFUITests.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.debug production.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.debug production.xcconfig"; sourceTree = ""; }; - 8A3B80310DD60972624107DC /* Pods-sample.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.release staging.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.release staging.xcconfig"; sourceTree = ""; }; 8CA52B4C8C3AF1CB2181C14D /* UseCaseFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UseCaseFactoryProtocol.swift; sourceTree = ""; }; - 8DB9CE8A29FEA7CC50C0B5BA /* Pods-sampleTests.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.release staging.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.release staging.xcconfig"; sourceTree = ""; }; - 8F5DD1ABDC680B941C2D4141 /* Pods-sample.release production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.release production.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.release production.xcconfig"; sourceTree = ""; }; - 9DF8B93967CC161BAE88D7E6 /* Pods_sample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 981F0F871D925FE7914E9C15 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.release staging.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.release staging.xcconfig"; sourceTree = ""; }; A29F97F67192DE9B66E872E6 /* Color+Application.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Application.swift"; sourceTree = ""; }; + A562DA14B41BE5B952C134C0 /* Pods-sample.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.debug production.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.debug production.xcconfig"; sourceTree = ""; }; A64B0E7B034D526205048030 /* Navigator+Scene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Navigator+Scene.swift"; sourceTree = ""; }; - A8935DC06D0CBFF9709D60D5 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.debug staging.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.debug staging.xcconfig"; sourceTree = ""; }; + AC4722FDB2A1310A47F9067A /* Pods-sampleTests.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.debug production.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.debug production.xcconfig"; sourceTree = ""; }; ADE63A1C257C06E1D05C8136 /* DebugStaging.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugStaging.xcconfig; sourceTree = ""; }; B8847183C3FF3D70FE4192CD /* sampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = sampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - BBB67085769D456537EA372D /* Pods-sampleTests.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.debug production.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.debug production.xcconfig"; sourceTree = ""; }; BBD1568B768046A18E011F2C /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; BBF1B234787FCD92142B105D /* AutoMockable.generated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoMockable.generated.swift; sourceTree = ""; }; BD9D9C9A495C5EA0AE9039C6 /* ReleaseProduction.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ReleaseProduction.xcconfig; sourceTree = ""; }; + BEF0EB01711244FFB6FA35DA /* Pods-sample-sampleKIFUITests.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample-sampleKIFUITests.debug production.xcconfig"; path = "Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests.debug production.xcconfig"; sourceTree = ""; }; C159B27C88C08E8AEB22AFD4 /* Navigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Navigator.swift; sourceTree = ""; }; - CD21AA8F176DDB7A0FF39393 /* Pods-sample.debug production.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.debug production.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.debug production.xcconfig"; sourceTree = ""; }; + C74413459B5EDB5F5E18EE55 /* Pods-sample.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.release staging.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.release staging.xcconfig"; sourceTree = ""; }; + C75075CB343661CBEB584A37 /* Pods-sampleTests.release staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sampleTests.release staging.xcconfig"; path = "Target Support Files/Pods-sampleTests/Pods-sampleTests.release staging.xcconfig"; sourceTree = ""; }; CD3A7C3AC94E15DEC4F12A85 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; CDBCDCBA1D855D7023A0342F /* UIView+Subviews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Subviews.swift"; sourceTree = ""; }; + D03EC565B9CCAC1D2A6D3CBD /* Pods-sample.debug staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sample.debug staging.xcconfig"; path = "Target Support Files/Pods-sample/Pods-sample.debug staging.xcconfig"; sourceTree = ""; }; D2D7345A2017D2D372785123 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D2F657F289C5314152FFCFA2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D7BF6B31569F36BD756160D7 /* Pods_sampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_sampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E4C58806C2B28AED0873F8AF /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; EFAE58D40BFE459B1184D994 /* KIF+Swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KIF+Swift.swift"; sourceTree = ""; }; EFE5D281FD0FFFF44FC92B04 /* .gitkeep */ = {isa = PBXFileReference; path = .gitkeep; sourceTree = ""; }; @@ -141,7 +141,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9B572CAD82F5648A06EF0314 /* Pods_sample_sampleKIFUITests.framework in Frameworks */, + 6D46BAB1604A07B6D3241779 /* Pods_sample_sampleKIFUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,7 +149,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B8C7DBD0EBB8E47F77D77A39 /* Pods_sampleTests.framework in Frameworks */, + B64808A990DDFE59C437CC25 /* Pods_sampleTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -157,7 +157,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DF61A00144BEDB597677AFAB /* Pods_sample.framework in Frameworks */, + 629475533046B80D46AFBF00 /* Pods_sample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -242,6 +242,26 @@ path = Supports; sourceTree = ""; }; + 477745C66584016C219617EB /* Pods */ = { + isa = PBXGroup; + children = ( + A562DA14B41BE5B952C134C0 /* Pods-sample.debug production.xcconfig */, + D03EC565B9CCAC1D2A6D3CBD /* Pods-sample.debug staging.xcconfig */, + 37D6479155B7CB6113411C9F /* Pods-sample.release production.xcconfig */, + C74413459B5EDB5F5E18EE55 /* Pods-sample.release staging.xcconfig */, + BEF0EB01711244FFB6FA35DA /* Pods-sample-sampleKIFUITests.debug production.xcconfig */, + 35E2DAC9B94DA53C7E3683A6 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */, + 03A3630DEE50F53400BA4B19 /* Pods-sample-sampleKIFUITests.release production.xcconfig */, + 981F0F871D925FE7914E9C15 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */, + AC4722FDB2A1310A47F9067A /* Pods-sampleTests.debug production.xcconfig */, + 5E7B8A83E0D97844A07CFB33 /* Pods-sampleTests.debug staging.xcconfig */, + 32B388D0C550ECB5FA455EEE /* Pods-sampleTests.release production.xcconfig */, + C75075CB343661CBEB584A37 /* Pods-sampleTests.release staging.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 4DFA6BBE9DD6BD7704BB129C /* Sources */ = { isa = PBXGroup; children = ( @@ -261,9 +281,9 @@ 52B072A663159D9D007D540F /* Frameworks */ = { isa = PBXGroup; children = ( - 9DF8B93967CC161BAE88D7E6 /* Pods_sample.framework */, - 03BEA10CB7B6DEE29A61CC9B /* Pods_sample_sampleKIFUITests.framework */, - D7BF6B31569F36BD756160D7 /* Pods_sampleTests.framework */, + 103410355FEB204A3E584E03 /* Pods_sample.framework */, + 719767D90ACE9AF96B8F661D /* Pods_sample_sampleKIFUITests.framework */, + 457D558538D15BD9C5450B40 /* Pods_sampleTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -298,7 +318,7 @@ 9B7CF20BE2915B62911C62AA /* Project */, 52B072A663159D9D007D540F /* Frameworks */, 372816F20EC291B850EECF1F /* Products */, - ABD110A1A6F61AEFE2159B2C /* Pods */, + 477745C66584016C219617EB /* Pods */, ); sourceTree = ""; }; @@ -410,26 +430,6 @@ path = Application; sourceTree = ""; }; - ABD110A1A6F61AEFE2159B2C /* Pods */ = { - isa = PBXGroup; - children = ( - CD21AA8F176DDB7A0FF39393 /* Pods-sample.debug production.xcconfig */, - 6881636BF664E9935E20AD46 /* Pods-sample.debug staging.xcconfig */, - 8F5DD1ABDC680B941C2D4141 /* Pods-sample.release production.xcconfig */, - 8A3B80310DD60972624107DC /* Pods-sample.release staging.xcconfig */, - 840F9001316ABA7052841819 /* Pods-sample-sampleKIFUITests.debug production.xcconfig */, - A8935DC06D0CBFF9709D60D5 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */, - 5E2F732FE10206795FDF97A0 /* Pods-sample-sampleKIFUITests.release production.xcconfig */, - 44331CC8E4C1C49B1BE0E896 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */, - BBB67085769D456537EA372D /* Pods-sampleTests.debug production.xcconfig */, - 01B45E2C9F888E5269388564 /* Pods-sampleTests.debug staging.xcconfig */, - 6DAF1A76B695970472FE8753 /* Pods-sampleTests.release production.xcconfig */, - 8DB9CE8A29FEA7CC50C0B5BA /* Pods-sampleTests.release staging.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; ABEF6635E5835AF1887B4B45 /* Sources */ = { isa = PBXGroup; children = ( @@ -570,7 +570,7 @@ isa = PBXNativeTarget; buildConfigurationList = 56FE2126489C1E87A2D918A3 /* Build configuration list for PBXNativeTarget "sample" */; buildPhases = ( - 3E041B93D87D28D68F71C236 /* [CP] Check Pods Manifest.lock */, + 24C20966A204D692AACAF7FC /* [CP] Check Pods Manifest.lock */, B2B621CC2B1F4F58601CD98D /* Sourcery */, 7EB246CFC1E0CCBA652DC37E /* R.swift */, CF26733D03C8D33F8823EE1F /* SwiftLint */, @@ -580,7 +580,7 @@ 494614C33B509301DBBDAD42 /* Embed Frameworks */, 89C77BA3C707AD804F79284B /* Frameworks */, 843C67A8A78058B8D8B3D11E /* Copy GoogleService-Info.plist */, - C8D448AA1EA81C955E48A4C4 /* [CP] Embed Pods Frameworks */, + F58778F510219EE1648332E1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -595,12 +595,12 @@ isa = PBXNativeTarget; buildConfigurationList = 31E84C030BDB7A39BCE38D8C /* Build configuration list for PBXNativeTarget "sampleKIFUITests" */; buildPhases = ( - 88EB0BE58BA6474A0E8A1971 /* [CP] Check Pods Manifest.lock */, + E7AFC0638AC333E547DD8143 /* [CP] Check Pods Manifest.lock */, 21ADDF0B071B770FFB6A086A /* Sources */, 43218B877C978B4CA5B93235 /* Resources */, 392BFB718CBF57CF0D23848E /* Embed Frameworks */, 29CEF4F9FF315D4254B8BC69 /* Frameworks */, - 52759233B4C5DBB595F21FA8 /* [CP] Embed Pods Frameworks */, + CCB3021C0293822B98F31D55 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -616,13 +616,13 @@ isa = PBXNativeTarget; buildConfigurationList = C3875EBB5A0F6612B3515A13 /* Build configuration list for PBXNativeTarget "sampleTests" */; buildPhases = ( - E539E41456501BCCDF34A9A2 /* [CP] Check Pods Manifest.lock */, + AE10932EB614537ADB9EA886 /* [CP] Check Pods Manifest.lock */, 2F7B6AB35D89AA83D514ECC2 /* SwiftFormat */, 9344943859735CAEA8DDB048 /* Sources */, E472A2AC48FE9588146AB254 /* Resources */, 51D3263E7013F91DCDB0D884 /* Embed Frameworks */, 7A7AFF7C6576A774E896CA81 /* Frameworks */, - 04C1A3263A9F6E783F4E0B4B /* [CP] Embed Pods Frameworks */, + 805B7CE25AE9A9C14E600707 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -703,21 +703,26 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 04C1A3263A9F6E783F4E0B4B /* [CP] Embed Pods Frameworks */ = { + 24C20966A204D692AACAF7FC /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-sample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 2F7B6AB35D89AA83D514ECC2 /* SwiftFormat */ = { @@ -738,65 +743,43 @@ shellPath = /bin/sh; shellScript = "if [ -z \"$CI\" ]; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\"\nfi"; }; - 3E041B93D87D28D68F71C236 /* [CP] Check Pods Manifest.lock */ = { + 7EB246CFC1E0CCBA652DC37E /* R.swift */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = R.swift; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-sample-checkManifestLockResult.txt", + "$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "\"$PODS_ROOT/R.swift/rswift\" generate \"$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift\""; }; - 52759233B4C5DBB595F21FA8 /* [CP] Embed Pods Frameworks */ = { + 805B7CE25AE9A9C14E600707 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 7EB246CFC1E0CCBA652DC37E /* R.swift */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = R.swift; - outputFileListPaths = ( - ); - outputPaths = ( - "$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$PODS_ROOT/R.swift/rswift\" generate \"$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift\""; - }; 843C67A8A78058B8D8B3D11E /* Copy GoogleService-Info.plist */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -815,7 +798,7 @@ shellPath = /bin/sh; shellScript = "PATH_TO_GOOGLE_PLISTS=\"$SRCROOT/$PROJECT_NAME/Configurations/Plists/GoogleService\"\n\ncase \"${CONFIGURATION}\" in\n\"Debug Staging\" | \"Release Staging\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Staging/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n\"Debug Production\" | \"Release Production\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Production/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n*)\n;;\nesac"; }; - 88EB0BE58BA6474A0E8A1971 /* [CP] Check Pods Manifest.lock */ = { + AE10932EB614537ADB9EA886 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -830,7 +813,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-sample-sampleKIFUITests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-sampleTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -855,21 +838,21 @@ shellPath = /bin/sh; shellScript = "\"$PODS_ROOT/Sourcery/bin/sourcery\""; }; - C8D448AA1EA81C955E48A4C4 /* [CP] Embed Pods Frameworks */ = { + CCB3021C0293822B98F31D55 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; CF26733D03C8D33F8823EE1F /* SwiftLint */ = { @@ -890,7 +873,7 @@ shellPath = /bin/sh; shellScript = "if [ -z \"$CI\" ]; then\n ${PODS_ROOT}/SwiftLint/swiftlint\nfi"; }; - E539E41456501BCCDF34A9A2 /* [CP] Check Pods Manifest.lock */ = { + E7AFC0638AC333E547DD8143 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -905,7 +888,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-sampleTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-sample-sampleKIFUITests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -930,6 +913,23 @@ shellPath = /bin/sh; shellScript = "if [ -z \"$CI\" ]; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\" --lint --lenient\nfi"; }; + F58778F510219EE1648332E1 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample/Pods-sample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -989,7 +989,7 @@ /* Begin XCBuildConfiguration section */ 21ACBFF0B81C5FE1926420D2 /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 840F9001316ABA7052841819 /* Pods-sample-sampleKIFUITests.debug production.xcconfig */; + baseConfigurationReference = BEF0EB01711244FFB6FA35DA /* Pods-sample-sampleKIFUITests.debug production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1014,7 +1014,7 @@ }; 252EA76B363BC50D825D8BD6 /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 01B45E2C9F888E5269388564 /* Pods-sampleTests.debug staging.xcconfig */; + baseConfigurationReference = 5E7B8A83E0D97844A07CFB33 /* Pods-sampleTests.debug staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1039,7 +1039,7 @@ }; 388E6BE620787A06CA1CA7EE /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8A3B80310DD60972624107DC /* Pods-sample.release staging.xcconfig */; + baseConfigurationReference = C74413459B5EDB5F5E18EE55 /* Pods-sample.release staging.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1063,7 +1063,7 @@ }; 38F81F703A83D6A307430059 /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5E2F732FE10206795FDF97A0 /* Pods-sample-sampleKIFUITests.release production.xcconfig */; + baseConfigurationReference = 03A3630DEE50F53400BA4B19 /* Pods-sample-sampleKIFUITests.release production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1087,7 +1087,7 @@ }; 3BEDFE87FC2F0AE206422087 /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6DAF1A76B695970472FE8753 /* Pods-sampleTests.release production.xcconfig */; + baseConfigurationReference = 32B388D0C550ECB5FA455EEE /* Pods-sampleTests.release production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1111,7 +1111,7 @@ }; 3E22885F8CD58F60301062E2 /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 44331CC8E4C1C49B1BE0E896 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */; + baseConfigurationReference = 981F0F871D925FE7914E9C15 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1135,7 +1135,7 @@ }; 4C1D6824327C0FD7CA0FD5EA /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8F5DD1ABDC680B941C2D4141 /* Pods-sample.release production.xcconfig */; + baseConfigurationReference = 37D6479155B7CB6113411C9F /* Pods-sample.release production.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1218,7 +1218,7 @@ }; 65EFF1C45B23F50B02803EAD /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6881636BF664E9935E20AD46 /* Pods-sample.debug staging.xcconfig */; + baseConfigurationReference = D03EC565B9CCAC1D2A6D3CBD /* Pods-sample.debug staging.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1243,7 +1243,7 @@ }; 944F5AFF63FDFD18DB25D45F /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CD21AA8F176DDB7A0FF39393 /* Pods-sample.debug production.xcconfig */; + baseConfigurationReference = A562DA14B41BE5B952C134C0 /* Pods-sample.debug production.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1268,7 +1268,7 @@ }; A6CE62F8A695FBBC221E4690 /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BBB67085769D456537EA372D /* Pods-sampleTests.debug production.xcconfig */; + baseConfigurationReference = AC4722FDB2A1310A47F9067A /* Pods-sampleTests.debug production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1293,7 +1293,7 @@ }; B7E6733E7030283A3E74681B /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A8935DC06D0CBFF9709D60D5 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */; + baseConfigurationReference = 35E2DAC9B94DA53C7E3683A6 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1371,7 +1371,7 @@ }; BD91BBB9D406D96A13EB8291 /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8DB9CE8A29FEA7CC50C0B5BA /* Pods-sampleTests.release staging.xcconfig */; + baseConfigurationReference = C75075CB343661CBEB584A37 /* Pods-sampleTests.release staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; diff --git a/sample/shared/build.gradle.kts b/sample/shared/build.gradle.kts index d05b7982..b9cca8ba 100644 --- a/sample/shared/build.gradle.kts +++ b/sample/shared/build.gradle.kts @@ -67,7 +67,7 @@ kotlin { implementation(kotlin("test")) with(Dependencies.Test) { implementation(COROUTINES) - implementation(KOTEST_ASSERTIONS) + implementation(KOTEST) implementation(KOTLINX_RESOURCES) implementation(MOCKATIVE) implementation(TURBINE) @@ -114,9 +114,9 @@ ksp { android { namespace = "co.nimblehq.kmm.template" - compileSdk = Versions.ANDROID_COMPILE_SDK_VERSION + compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { - minSdk = Versions.ANDROID_MIN_SDK_VERSION + minSdk = Versions.ANDROID_MIN_SDK } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 81% rename from sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index 3320a9b8..78fdf537 100644 --- a/sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/sample/shared/src/androidMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import io.ktor.client.engine.android.Android import org.koin.core.module.Module diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt new file mode 100644 index 00000000..40d0d5f0 --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/RemoteDataSource.kt @@ -0,0 +1,16 @@ +package co.nimblehq.kmm.template.data.remote.datasources + +import co.nimblehq.kmm.template.data.remote.models.responses.Response +import co.nimblehq.kmm.template.data.remote.ApiClient + +interface RemoteDataSource { + suspend fun getUsers(): List +} + +internal class RemoteDataSourceImpl(private val apiClient: ApiClient) : RemoteDataSource { + override suspend fun getUsers(): List { + return apiClient.get( + path = "users" + ) + } +} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt deleted file mode 100644 index 04e404d4..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/datasources/UserRemoteDataSource.kt +++ /dev/null @@ -1,16 +0,0 @@ -package co.nimblehq.kmm.template.data.remote.datasources - -import co.nimblehq.kmm.template.data.remote.model.responses.UserResponse -import co.nimblehq.kmm.template.data.remote.ApiClient - -interface UserRemoteDataSource { - suspend fun getUsers(): List -} - -internal class UserRemoteDataSourceImpl(private val apiClient: ApiClient) : UserRemoteDataSource { - override suspend fun getUsers(): List { - return apiClient.get( - path = "users" - ) - } -} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt deleted file mode 100644 index 2536f150..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/model/responses/UserResponse.kt +++ /dev/null @@ -1,12 +0,0 @@ -package co.nimblehq.kmm.template.data.remote.model.responses - -import co.nimblehq.kmm.template.domain.model.UserModel -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable - -@Serializable -data class UserResponse( - @SerialName("id") val id: Int? -) - -fun UserResponse.toModel() = UserModel(id) diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt new file mode 100644 index 00000000..ab0421b4 --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/remote/models/responses/Response.kt @@ -0,0 +1,12 @@ +package co.nimblehq.kmm.template.data.remote.models.responses + +import co.nimblehq.kmm.template.domain.models.Model +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class Response( + @SerialName("id") val id: Int? +) + +fun Response.toModel() = Model(id) diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt index eb4bae32..bd541db4 100644 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryImpl.kt @@ -1,16 +1,16 @@ package co.nimblehq.kmm.template.data.repositories import co.nimblehq.kmm.template.data.extensions.flowTransform -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource -import co.nimblehq.kmm.template.data.remote.model.responses.toModel -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource +import co.nimblehq.kmm.template.data.remote.models.responses.toModel +import co.nimblehq.kmm.template.domain.models.Model import co.nimblehq.kmm.template.domain.repositories.Repository import kotlinx.coroutines.flow.Flow class RepositoryImpl( - private val userRemoteDataSource: UserRemoteDataSource + private val remoteDataSource: RemoteDataSource ) : Repository { - override fun getUsers(): Flow> = flowTransform { - userRemoteDataSource.getUsers().map { it.toModel() } + override fun getUsers(): Flow> = flowTransform { + remoteDataSource.getUsers().map { it.toModel() } } } diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt index ab8c8bb2..7d254713 100644 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/Koin.kt @@ -1,6 +1,6 @@ package co.nimblehq.kmm.template.di -import co.nimblehq.kmm.template.di.module.* +import co.nimblehq.kmm.template.di.modules.* import org.koin.core.KoinApplication import org.koin.core.context.startKoin import org.koin.dsl.KoinAppDeclaration diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt deleted file mode 100644 index da79f2ed..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RemoteModule.kt +++ /dev/null @@ -1,13 +0,0 @@ -package co.nimblehq.kmm.template.di.module - -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource -import org.koin.dsl.module -import co.nimblehq.kmm.template.data.remote.ApiClient -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSourceImpl -import org.koin.core.module.dsl.singleOf -import org.koin.dsl.bind - -val remoteModule = module { - singleOf(::ApiClient) - singleOf(::UserRemoteDataSourceImpl) bind UserRemoteDataSource::class -} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt deleted file mode 100644 index e645c1ea..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/UseCaseModule.kt +++ /dev/null @@ -1,11 +0,0 @@ -package co.nimblehq.kmm.template.di.module - -import org.koin.core.module.dsl.singleOf -import org.koin.dsl.module -import co.nimblehq.kmm.template.domain.usecases.GetUsersUseCaseImpl -import co.nimblehq.kmm.template.domain.usecases.GetUsersUseCase -import org.koin.dsl.bind - -val useCaseModule = module { - singleOf(::GetUsersUseCaseImpl) bind GetUsersUseCase::class -} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 62% rename from sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index c9f61890..1964f8f3 100644 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import org.koin.core.module.Module diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt new file mode 100644 index 00000000..3db63691 --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RemoteModule.kt @@ -0,0 +1,13 @@ +package co.nimblehq.kmm.template.di.modules + +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource +import org.koin.dsl.module +import co.nimblehq.kmm.template.data.remote.ApiClient +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSourceImpl +import org.koin.core.module.dsl.singleOf +import org.koin.dsl.bind + +val remoteModule = module { + singleOf(::ApiClient) + singleOf(::RemoteDataSourceImpl) bind RemoteDataSource::class +} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt similarity index 87% rename from sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt rename to sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt index 60ff81ce..5d844744 100644 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/module/RepositoryModule.kt +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/RepositoryModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import org.koin.core.module.dsl.singleOf import org.koin.dsl.module diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt new file mode 100644 index 00000000..45ea8790 --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/di/modules/UseCaseModule.kt @@ -0,0 +1,11 @@ +package co.nimblehq.kmm.template.di.modules + +import org.koin.core.module.dsl.singleOf +import org.koin.dsl.module +import co.nimblehq.kmm.template.domain.usecases.UseCaseImpl +import co.nimblehq.kmm.template.domain.usecases.UseCase +import org.koin.dsl.bind + +val useCaseModule = module { + singleOf(::UseCaseImpl) bind UseCase::class +} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt deleted file mode 100644 index f017aaab..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/model/UserModel.kt +++ /dev/null @@ -1,5 +0,0 @@ -package co.nimblehq.kmm.template.domain.model - -data class UserModel( - val id: Int? -) diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt new file mode 100644 index 00000000..0155513c --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/models/Model.kt @@ -0,0 +1,5 @@ +package co.nimblehq.kmm.template.domain.models + +data class Model( + val id: Int? +) diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt index e93a5052..319e5f02 100644 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/repositories/Repository.kt @@ -1,8 +1,8 @@ package co.nimblehq.kmm.template.domain.repositories -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import kotlinx.coroutines.flow.Flow interface Repository { - fun getUsers(): Flow> + fun getUsers(): Flow> } diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt deleted file mode 100644 index 59bb3dfb..00000000 --- a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCase.kt +++ /dev/null @@ -1,14 +0,0 @@ -package co.nimblehq.kmm.template.domain.usecases - -import co.nimblehq.kmm.template.domain.model.UserModel -import co.nimblehq.kmm.template.domain.repositories.Repository -import kotlinx.coroutines.flow.Flow - -interface GetUsersUseCase { - operator fun invoke(): Flow> -} - -class GetUsersUseCaseImpl(private val repository: Repository) : GetUsersUseCase { - - override fun invoke(): Flow> = repository.getUsers() -} diff --git a/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt new file mode 100644 index 00000000..4f8641a5 --- /dev/null +++ b/sample/shared/src/commonMain/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCase.kt @@ -0,0 +1,14 @@ +package co.nimblehq.kmm.template.domain.usecases + +import co.nimblehq.kmm.template.domain.models.Model +import co.nimblehq.kmm.template.domain.repositories.Repository +import kotlinx.coroutines.flow.Flow + +interface UseCase { + operator fun invoke(): Flow> +} + +class UseCaseImpl(private val repository: Repository) : UseCase { + + override fun invoke(): Flow> = repository.getUsers() +} diff --git a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt index 9ec12565..44592df9 100644 --- a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt +++ b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/data/repositories/RepositoryTest.kt @@ -1,10 +1,10 @@ package co.nimblehq.kmm.template.data.repositories import app.cash.turbine.test -import co.nimblehq.kmm.template.data.remote.datasources.UserRemoteDataSource +import co.nimblehq.kmm.template.data.remote.datasources.RemoteDataSource import co.nimblehq.kmm.template.domain.repositories.Repository -import co.nimblehq.kmm.template.util.Fake.user -import co.nimblehq.kmm.template.util.Fake.userResponse +import co.nimblehq.kmm.template.util.Fake.model +import co.nimblehq.kmm.template.util.Fake.response import io.kotest.matchers.shouldBe import io.mockative.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -16,24 +16,24 @@ import kotlin.test.Test class RepositoryTest { @Mock - private val mockUserRemoteDataSource = mock(UserRemoteDataSource::class) + private val mockRemoteDataSource = mock(RemoteDataSource::class) private lateinit var repository: Repository @BeforeTest fun setup() { - repository = RepositoryImpl(mockUserRemoteDataSource) + repository = RepositoryImpl(mockRemoteDataSource) } @Test fun `when calling getUsers successfully - it returns users`() = runTest { - given(mockUserRemoteDataSource) - .suspendFunction(mockUserRemoteDataSource::getUsers) + given(mockRemoteDataSource) + .suspendFunction(mockRemoteDataSource::getUsers) .whenInvoked() - .thenReturn(listOf(userResponse)) + .thenReturn(listOf(response)) repository.getUsers().test { - awaitItem() shouldBe listOf(user) + awaitItem() shouldBe listOf(model) awaitComplete() } } @@ -41,8 +41,8 @@ class RepositoryTest { @Test fun `when calling getUsers fails - it throws the corresponding error`() = runTest { val throwable = Throwable() - given(mockUserRemoteDataSource) - .suspendFunction(mockUserRemoteDataSource::getUsers) + given(mockRemoteDataSource) + .suspendFunction(mockRemoteDataSource::getUsers) .whenInvoked() .thenThrow(throwable) diff --git a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt similarity index 71% rename from sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt rename to sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt index e8ec632b..79549421 100644 --- a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/GetUsersUseCaseTest.kt +++ b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/domain/usecases/UseCaseTest.kt @@ -2,7 +2,7 @@ package co.nimblehq.kmm.template.domain.usecases import app.cash.turbine.test import co.nimblehq.kmm.template.domain.repositories.Repository -import co.nimblehq.kmm.template.util.Fake.user +import co.nimblehq.kmm.template.util.Fake.model import io.kotest.matchers.shouldBe import io.mockative.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -13,33 +13,33 @@ import kotlin.test.BeforeTest import kotlin.test.Test @ExperimentalCoroutinesApi -class GetUsersUseCaseTest { +class UseCaseTest { @Mock private val mockRepository: Repository = mock(Repository::class) - private lateinit var useCase: GetUsersUseCase + private lateinit var useCase: UseCase @BeforeTest fun setUp() { - useCase = GetUsersUseCaseImpl(mockRepository) + useCase = UseCaseImpl(mockRepository) } @Test - fun `When calling getUsers successfully - it returns users`() = runTest { + fun `When calling successfully - it returns users`() = runTest { given(mockRepository) .function(mockRepository::getUsers) .whenInvoked() - .thenReturn(flowOf(listOf(user))) + .thenReturn(flowOf(listOf(model))) useCase().test { - awaitItem() shouldBe listOf(user) + awaitItem() shouldBe listOf(model) awaitComplete() } } @Test - fun `when calling getUsers fails - it throws the corresponding error`() = runTest { + fun `when calling fails - it throws the corresponding error`() = runTest { val throwable = Throwable() given(mockRepository) .function(mockRepository::getUsers) diff --git a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt index dc370775..6346d0b9 100644 --- a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt +++ b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/extensions/ResponseMappingTest.kt @@ -2,7 +2,7 @@ package co.nimblehq.kmm.template.extensions import app.cash.turbine.test import co.nimblehq.kmm.template.data.extensions.flowTransform -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.domain.models.Model import io.kotest.matchers.shouldBe import io.ktor.utils.io.errors.* import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -14,7 +14,7 @@ class ResponseMappingTest { @Test fun `When mapping API request flow failed with Exception - it returns Exception error`() = runTest { - flowTransform { + flowTransform { throw Exception() }.test { awaitError() shouldBe Exception() @@ -24,7 +24,7 @@ class ResponseMappingTest { @Test fun `When mapping API request flow failed with a generic error - it returns that error`() = runTest { val error = IOException("no internet") - flowTransform { + flowTransform { throw error }.test { awaitError() shouldBe error diff --git a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt index 5c4fa937..da1094a8 100644 --- a/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt +++ b/sample/shared/src/commonTest/kotlin/co/nimblehq/kmm/template/util/Fake.kt @@ -1,11 +1,11 @@ package co.nimblehq.kmm.template.util -import co.nimblehq.kmm.template.data.remote.model.responses.UserResponse -import co.nimblehq.kmm.template.domain.model.UserModel +import co.nimblehq.kmm.template.data.remote.models.responses.Response +import co.nimblehq.kmm.template.domain.models.Model object Fake { - val user = UserModel(id = 0) + val model = Model(id = 0) - val userResponse = UserResponse(id = 0) + val response = Response(id = 0) } diff --git a/sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt b/sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt similarity index 80% rename from sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt rename to sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt index 6b9b4ecd..f08cecbb 100644 --- a/sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/module/PlatformModule.kt +++ b/sample/shared/src/iosMain/kotlin/co/nimblehq/kmm/template/di/modules/PlatformModule.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.di.module +package co.nimblehq.kmm.template.di.modules import io.ktor.client.engine.darwin.Darwin import org.koin.core.module.Module From 10326df207517f7bf083248fe94a4cb262f800bc Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Tue, 29 Aug 2023 11:13:59 +0700 Subject: [PATCH 6/7] [#29] Rename Android's app id --- android/build.gradle.kts | 4 ++-- .../nimblehq/kmm/template/{android => }/util/LogUtil.kt | 2 +- android/src/main/AndroidManifest.xml | 4 ++-- .../{android/MyApplication.kt => MainApplication.kt} | 8 ++++---- .../co/nimblehq/kmm/template/android/lib/TypeAlias.kt | 3 --- .../kmm/template/{android => }/di/ViewModelModule.kt | 2 +- .../main/java/co/nimblehq/kmm/template/lib/TypeAlias.kt | 3 +++ .../kmm/template/{android => }/ui/base/BaseViewModel.kt | 6 +++--- .../{android => }/ui/navigation/AppDestination.kt | 2 +- .../template/{android => }/ui/navigation/AppNavigation.kt | 4 ++-- .../kmm/template/{android => }/ui/screens/MainActivity.kt | 6 +++--- .../template/{android => }/ui/screens/home/HomeScreen.kt | 4 ++-- .../kmm/template/{android => }/ui/theme/AppColors.kt | 2 +- .../kmm/template/{android => }/ui/theme/AppDimensions.kt | 2 +- .../kmm/template/{android => }/ui/theme/AppStyles.kt | 2 +- .../nimblehq/kmm/template/{android => }/ui/theme/Theme.kt | 2 +- .../template/{android => }/util/DispatchersProvider.kt | 2 +- .../nimblehq/kmm/template/{android => }/util/LogUtil.kt | 2 +- .../kmm/template/{android => }/test/CoroutineTestRule.kt | 2 +- 19 files changed, 31 insertions(+), 31 deletions(-) rename android/src/debug/java/co/nimblehq/kmm/template/{android => }/util/LogUtil.kt (72%) rename android/src/main/java/co/nimblehq/kmm/template/{android/MyApplication.kt => MainApplication.kt} (63%) delete mode 100644 android/src/main/java/co/nimblehq/kmm/template/android/lib/TypeAlias.kt rename android/src/main/java/co/nimblehq/kmm/template/{android => }/di/ViewModelModule.kt (77%) create mode 100644 android/src/main/java/co/nimblehq/kmm/template/lib/TypeAlias.kt rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/base/BaseViewModel.kt (88%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/navigation/AppDestination.kt (86%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/navigation/AppNavigation.kt (90%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/screens/MainActivity.kt (67%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/screens/home/HomeScreen.kt (82%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppColors.kt (93%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppDimensions.kt (79%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppStyles.kt (77%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/Theme.kt (97%) rename android/src/main/java/co/nimblehq/kmm/template/{android => }/util/DispatchersProvider.kt (89%) rename android/src/release/java/co/nimblehq/kmm/template/{android => }/util/LogUtil.kt (68%) rename android/src/test/java/co/nimblehq/kmm/template/{android => }/test/CoroutineTestRule.kt (92%) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 4a0c03fc..b077b599 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -9,10 +9,10 @@ plugins { val keystoreProperties = loadProperties("$rootDir/signing.properties") android { - namespace = "co.nimblehq.kmm.template.android" + namespace = "co.nimblehq.kmm.template" compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { - applicationId = "co.nimblehq.kmm.template.android" + applicationId = "co.nimblehq.kmm.template" minSdk = Versions.ANDROID_MIN_SDK targetSdk = Versions.ANDROID_TARGET_SDK versionCode = Versions.ANDROID_VERSION_CODE diff --git a/android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt b/android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt similarity index 72% rename from android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt rename to android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt index 441bd848..d6aa6e3b 100644 --- a/android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt +++ b/android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.android.util +package co.nimblehq.kmm.template.util import timber.log.Timber diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 7bc2f159..44c41ed3 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,11 +1,11 @@ + package="co.nimblehq.kmm.template"> Date: Tue, 29 Aug 2023 04:20:26 +0000 Subject: [PATCH 7/7] [Chore] Generate & update sample project --- sample/android/build.gradle.kts | 4 +- .../template/{android => }/util/LogUtil.kt | 2 +- sample/android/src/main/AndroidManifest.xml | 4 +- .../MyApplication.kt => MainApplication.kt} | 8 +- .../kmm/template/android/lib/TypeAlias.kt | 3 - .../{android => }/di/ViewModelModule.kt | 2 +- .../co/nimblehq/kmm/template/lib/TypeAlias.kt | 3 + .../{android => }/ui/base/BaseViewModel.kt | 6 +- .../ui/navigation/AppDestination.kt | 2 +- .../ui/navigation/AppNavigation.kt | 4 +- .../{android => }/ui/screens/MainActivity.kt | 6 +- .../ui/screens/home/HomeScreen.kt | 4 +- .../{android => }/ui/theme/AppColors.kt | 2 +- .../{android => }/ui/theme/AppDimensions.kt | 2 +- .../{android => }/ui/theme/AppStyles.kt | 2 +- .../template/{android => }/ui/theme/Theme.kt | 2 +- .../{android => }/util/DispatchersProvider.kt | 2 +- .../template/{android => }/util/LogUtil.kt | 2 +- .../{android => }/test/CoroutineTestRule.kt | 2 +- sample/ios/sample.xcodeproj/project.pbxproj | 224 +++++++++--------- 20 files changed, 143 insertions(+), 143 deletions(-) rename sample/android/src/debug/java/co/nimblehq/kmm/template/{android => }/util/LogUtil.kt (72%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android/MyApplication.kt => MainApplication.kt} (63%) delete mode 100644 sample/android/src/main/java/co/nimblehq/kmm/template/android/lib/TypeAlias.kt rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/di/ViewModelModule.kt (77%) create mode 100644 sample/android/src/main/java/co/nimblehq/kmm/template/lib/TypeAlias.kt rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/base/BaseViewModel.kt (88%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/navigation/AppDestination.kt (86%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/navigation/AppNavigation.kt (90%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/screens/MainActivity.kt (67%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/screens/home/HomeScreen.kt (82%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppColors.kt (93%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppDimensions.kt (79%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/AppStyles.kt (77%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/ui/theme/Theme.kt (97%) rename sample/android/src/main/java/co/nimblehq/kmm/template/{android => }/util/DispatchersProvider.kt (89%) rename sample/android/src/release/java/co/nimblehq/kmm/template/{android => }/util/LogUtil.kt (68%) rename sample/android/src/test/java/co/nimblehq/kmm/template/{android => }/test/CoroutineTestRule.kt (92%) diff --git a/sample/android/build.gradle.kts b/sample/android/build.gradle.kts index 4a0c03fc..b077b599 100644 --- a/sample/android/build.gradle.kts +++ b/sample/android/build.gradle.kts @@ -9,10 +9,10 @@ plugins { val keystoreProperties = loadProperties("$rootDir/signing.properties") android { - namespace = "co.nimblehq.kmm.template.android" + namespace = "co.nimblehq.kmm.template" compileSdk = Versions.ANDROID_COMPILE_SDK defaultConfig { - applicationId = "co.nimblehq.kmm.template.android" + applicationId = "co.nimblehq.kmm.template" minSdk = Versions.ANDROID_MIN_SDK targetSdk = Versions.ANDROID_TARGET_SDK versionCode = Versions.ANDROID_VERSION_CODE diff --git a/sample/android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt b/sample/android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt similarity index 72% rename from sample/android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt rename to sample/android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt index 441bd848..d6aa6e3b 100644 --- a/sample/android/src/debug/java/co/nimblehq/kmm/template/android/util/LogUtil.kt +++ b/sample/android/src/debug/java/co/nimblehq/kmm/template/util/LogUtil.kt @@ -1,4 +1,4 @@ -package co.nimblehq.kmm.template.android.util +package co.nimblehq.kmm.template.util import timber.log.Timber diff --git a/sample/android/src/main/AndroidManifest.xml b/sample/android/src/main/AndroidManifest.xml index 7bc2f159..44c41ed3 100644 --- a/sample/android/src/main/AndroidManifest.xml +++ b/sample/android/src/main/AndroidManifest.xml @@ -1,11 +1,11 @@ + package="co.nimblehq.kmm.template"> /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 2F7B6AB35D89AA83D514ECC2 /* SwiftFormat */ = { + 0D47A32864F3079721665E44 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); - name = SwiftFormat; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -z \"$CI\" ]; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\"\nfi"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 7EB246CFC1E0CCBA652DC37E /* R.swift */ = { + 2F7B6AB35D89AA83D514ECC2 /* SwiftFormat */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -753,34 +751,38 @@ ); inputPaths = ( ); - name = R.swift; + name = SwiftFormat; outputFileListPaths = ( ); outputPaths = ( - "$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$PODS_ROOT/R.swift/rswift\" generate \"$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift\""; + shellScript = "if [ -z \"$CI\" ]; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\"\nfi"; }; - 805B7CE25AE9A9C14E600707 /* [CP] Embed Pods Frameworks */ = { + 46FCA76401A1A20C46FEF5E2 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-sample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sampleTests/Pods-sampleTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 843C67A8A78058B8D8B3D11E /* Copy GoogleService-Info.plist */ = { + 66BC937C6DAD1606FDC47103 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -788,39 +790,41 @@ inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "Copy GoogleService-Info.plist"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-sample-sampleKIFUITests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "PATH_TO_GOOGLE_PLISTS=\"$SRCROOT/$PROJECT_NAME/Configurations/Plists/GoogleService\"\n\ncase \"${CONFIGURATION}\" in\n\"Debug Staging\" | \"Release Staging\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Staging/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n\"Debug Production\" | \"Release Production\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Production/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n*)\n;;\nesac"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - AE10932EB614537ADB9EA886 /* [CP] Check Pods Manifest.lock */ = { + 7EB246CFC1E0CCBA652DC37E /* R.swift */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = R.swift; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-sampleTests-checkManifestLockResult.txt", + "$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "\"$PODS_ROOT/R.swift/rswift\" generate \"$SRCROOT/$PROJECT_NAME/Sources/Supports/Helpers/Rswift/R.generated.swift\""; }; - B2B621CC2B1F4F58601CD98D /* Sourcery */ = { + 843C67A8A78058B8D8B3D11E /* Copy GoogleService-Info.plist */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -829,31 +833,32 @@ ); inputPaths = ( ); - name = Sourcery; + name = "Copy GoogleService-Info.plist"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$PODS_ROOT/Sourcery/bin/sourcery\""; + shellScript = "PATH_TO_GOOGLE_PLISTS=\"$SRCROOT/$PROJECT_NAME/Configurations/Plists/GoogleService\"\n\ncase \"${CONFIGURATION}\" in\n\"Debug Staging\" | \"Release Staging\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Staging/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n\"Debug Production\" | \"Release Production\" )\ncp -r \"$PATH_TO_GOOGLE_PLISTS/Production/GoogleService-Info.plist\" \"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n;;\n*)\n;;\nesac"; }; - CCB3021C0293822B98F31D55 /* [CP] Embed Pods Frameworks */ = { + B2B621CC2B1F4F58601CD98D /* Sourcery */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + ); + name = Sourcery; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "\"$PODS_ROOT/Sourcery/bin/sourcery\""; }; CF26733D03C8D33F8823EE1F /* SwiftLint */ = { isa = PBXShellScriptBuildPhase; @@ -873,26 +878,21 @@ shellPath = /bin/sh; shellScript = "if [ -z \"$CI\" ]; then\n ${PODS_ROOT}/SwiftLint/swiftlint\nfi"; }; - E7AFC0638AC333E547DD8143 /* [CP] Check Pods Manifest.lock */ = { + EC97C7D62A0D9B5846821A56 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-sample-sampleKIFUITests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sample-sampleKIFUITests/Pods-sample-sampleKIFUITests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; EF3878B82E1CD4611A640906 /* SwiftFormat Lint */ = { @@ -913,7 +913,7 @@ shellPath = /bin/sh; shellScript = "if [ -z \"$CI\" ]; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\" --lint --lenient\nfi"; }; - F58778F510219EE1648332E1 /* [CP] Embed Pods Frameworks */ = { + FE7F7DFF241D42FAD7ACD7B1 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -989,7 +989,7 @@ /* Begin XCBuildConfiguration section */ 21ACBFF0B81C5FE1926420D2 /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BEF0EB01711244FFB6FA35DA /* Pods-sample-sampleKIFUITests.debug production.xcconfig */; + baseConfigurationReference = EBDA4BD3B01AA58FA2282832 /* Pods-sample-sampleKIFUITests.debug production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1014,7 +1014,7 @@ }; 252EA76B363BC50D825D8BD6 /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5E7B8A83E0D97844A07CFB33 /* Pods-sampleTests.debug staging.xcconfig */; + baseConfigurationReference = 99E8C285A1EB9EB8D1258F99 /* Pods-sampleTests.debug staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1039,7 +1039,7 @@ }; 388E6BE620787A06CA1CA7EE /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C74413459B5EDB5F5E18EE55 /* Pods-sample.release staging.xcconfig */; + baseConfigurationReference = BA6D5691E818F93DE95E0596 /* Pods-sample.release staging.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1063,7 +1063,7 @@ }; 38F81F703A83D6A307430059 /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 03A3630DEE50F53400BA4B19 /* Pods-sample-sampleKIFUITests.release production.xcconfig */; + baseConfigurationReference = 9968633611342E4965317C10 /* Pods-sample-sampleKIFUITests.release production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1087,7 +1087,7 @@ }; 3BEDFE87FC2F0AE206422087 /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 32B388D0C550ECB5FA455EEE /* Pods-sampleTests.release production.xcconfig */; + baseConfigurationReference = 2C841C9A9C6FDB9B0F13A8A6 /* Pods-sampleTests.release production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1111,7 +1111,7 @@ }; 3E22885F8CD58F60301062E2 /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 981F0F871D925FE7914E9C15 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */; + baseConfigurationReference = BAA243538DD55675F4D219B6 /* Pods-sample-sampleKIFUITests.release staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1135,7 +1135,7 @@ }; 4C1D6824327C0FD7CA0FD5EA /* Release Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 37D6479155B7CB6113411C9F /* Pods-sample.release production.xcconfig */; + baseConfigurationReference = 6905D337038EF385175B48B6 /* Pods-sample.release production.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1218,7 +1218,7 @@ }; 65EFF1C45B23F50B02803EAD /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D03EC565B9CCAC1D2A6D3CBD /* Pods-sample.debug staging.xcconfig */; + baseConfigurationReference = 7CC6C9A311897D364F439A91 /* Pods-sample.debug staging.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1243,7 +1243,7 @@ }; 944F5AFF63FDFD18DB25D45F /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A562DA14B41BE5B952C134C0 /* Pods-sample.debug production.xcconfig */; + baseConfigurationReference = 33505B9BF9661A91BD331CAC /* Pods-sample.debug production.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1268,7 +1268,7 @@ }; A6CE62F8A695FBBC221E4690 /* Debug Production */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AC4722FDB2A1310A47F9067A /* Pods-sampleTests.debug production.xcconfig */; + baseConfigurationReference = AFDE323AE90AA9F8BB784958 /* Pods-sampleTests.debug production.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1293,7 +1293,7 @@ }; B7E6733E7030283A3E74681B /* Debug Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 35E2DAC9B94DA53C7E3683A6 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */; + baseConfigurationReference = A5148C808CDA1AD642875AB8 /* Pods-sample-sampleKIFUITests.debug staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -1371,7 +1371,7 @@ }; BD91BBB9D406D96A13EB8291 /* Release Staging */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C75075CB343661CBEB584A37 /* Pods-sampleTests.release staging.xcconfig */; + baseConfigurationReference = 69DFEA9CA5B6C8232B179885 /* Pods-sampleTests.release staging.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "iPhone Developer";