diff --git a/.github/workflows/build_mac_os.yml b/.github/workflows/build_mac_os.yml index a7283ef4..18446444 100644 --- a/.github/workflows/build_mac_os.yml +++ b/.github/workflows/build_mac_os.yml @@ -10,25 +10,24 @@ jobs: build: runs-on: macos-latest + timeout-minutes: 180 steps: - name: Checkout branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: set up JDK 17 - uses: actions/setup-java@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' - cache: gradle + distribution: 'zulu' + java-version: 21 - name: Grant execute permission for gradlew run: chmod +x gradlew - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable + - name: Set Xcode version + run: sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer - name: set up LOCAL_PROPERTIES env: @@ -36,4 +35,4 @@ jobs: run: echo "$LOCAL_PROPERTIES" > ./local.properties - name: Build with Gradle - run: ./gradlew iosArm64Binaries \ No newline at end of file + run: cd iosApp && xcodebuild -workspace ./iosApp.xcworkspace -scheme iosApp -configuration Debug -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15' CODE_SIGNING_ALLOWED='NO' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0b88628e..49401777 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,24 @@ *.iml .gradle -**/build/ -**/release/ -xcuserdata -!src/**/build/ -local.properties .idea +.kotlin +.fleet .DS_Store +build captures .externalNativeBuild .cxx +local.properties +xcuserdata +play_config.* +keystore.* +Gemfile.lock + +**/*.podspec + *.xcodeproj/* !*.xcodeproj/project.pbxproj !*.xcodeproj/xcshareddata/ !*.xcodeproj/project.xcworkspace/ !*.xcworkspace/contents.xcworkspacedata **/xcshareddata/WorkspaceSettings.xcsettings -.fleet -**/*.podspec -/iosApp/Podfile.lock -/iosApp/Pods diff --git a/README.md b/README.md index 463ee8fd..8546f8d2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is a Kotlin Multiplatform project targeting Android, iOS, Desktop, Server. * `/shared` is for the code that will be shared between all targets in the project. The most important subfolder is `commonMain`. If preferred, you can add code to the platform-specific folders here too. -* `/composeApp` is for code that will be shared across your Compose Multiplatform applications. +* `/commonApp` is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders: - `commonMain` is for code that’s common for all targets. - Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. diff --git a/build-logic/.gitignore b/build-logic/.gitignore new file mode 100644 index 00000000..00fd4ddd --- /dev/null +++ b/build-logic/.gitignore @@ -0,0 +1,2 @@ +/build +/.gradle \ No newline at end of file diff --git a/build-logic/convention/.gitignore b/build-logic/convention/.gitignore new file mode 100644 index 00000000..00fd4ddd --- /dev/null +++ b/build-logic/convention/.gitignore @@ -0,0 +1,2 @@ +/build +/.gradle \ No newline at end of file diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts new file mode 100644 index 00000000..e398cc09 --- /dev/null +++ b/build-logic/convention/build.gradle.kts @@ -0,0 +1,38 @@ +plugins { + `kotlin-dsl` +} + +group = "com.stslex.wizard.buildlogic" + +dependencies { + compileOnly(libs.android.gradlePlugin) + compileOnly(libs.kotlin.gradlePlugin) + compileOnly(libs.compose.gradlePlugin) + compileOnly(libs.ksp.gradlePlugin) + compileOnly(libs.room.gradlePlugin) +} + +gradlePlugin { + plugins { + register("kotlinLibraryMultiplatform") { + id = "convention.kmp.library" + implementationClass = "KMPLibraryConventionPlugin" + } + register("kotlinApplicationMultiplatform") { + id = "convention.kmp.application" + implementationClass = "KMPApplicationConventionPlugin" + } + register("kotlinLibraryComposeMultiplatform") { + id = "convention.kmp.library.compose" + implementationClass = "KMPLibraryComposeConventionPlugin" + } + register("kotlinLibraryComposeAndroid") { + id = "convention.android.library.compose" + implementationClass = "KotlinLibraryComposePlugin" + } + register("kotlinLibraryRoom") { + id = "convention.kmp.library.room" + implementationClass = "RoomLibraryConventionPlugin" + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/AppExt.kt b/build-logic/convention/src/main/kotlin/AppExt.kt new file mode 100644 index 00000000..5863a51f --- /dev/null +++ b/build-logic/convention/src/main/kotlin/AppExt.kt @@ -0,0 +1,36 @@ +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalog +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType + +internal object AppExt { + + const val APP_PREFIX = "com.stslex.wizard" + + /** + * Get the version catalog for the project + * */ + val Project.libs: VersionCatalog + get() = extensions.getByType().named("libs") + + /** + * Find the version of the library + */ + fun VersionCatalog.findVersionInt(name: String) = findVersion(name) + .get() + .requiredVersion + .toInt() + + /** + * Find the id of plugin + */ + fun VersionCatalog.findPluginId(name: String): String = findPlugin(name) + .get() + .get() + .pluginId + + /** + * Find the version of the library + */ + fun VersionCatalog.findVersionString(name: String) = findVersion(name).get().toString() +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/KMPApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KMPApplicationConventionPlugin.kt new file mode 100644 index 00000000..f4af519c --- /dev/null +++ b/build-logic/convention/src/main/kotlin/KMPApplicationConventionPlugin.kt @@ -0,0 +1,57 @@ +import AppExt.APP_PREFIX +import AppExt.findPluginId +import AppExt.findVersionInt +import AppExt.findVersionString +import AppExt.libs +import com.android.build.api.dsl.ApplicationExtension +import com.google.devtools.ksp.gradle.KspExtension +import com.stslex.wizard.convention.configureKMPCompose +import com.stslex.wizard.convention.configureKotlin +import com.stslex.wizard.convention.configureKotlinAndroid +import com.stslex.wizard.convention.configureKotlinAndroidCompose +import com.stslex.wizard.convention.configureKotlinMultiplatform +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.compose.ComposeExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +class KMPApplicationConventionPlugin : Plugin { + + override fun apply(target: Project): Unit = with(target) { + with(pluginManager) { + apply(libs.findPluginId("kotlinMultiplatform")) + apply(libs.findPluginId("kotlinCocoapods")) + apply(libs.findPluginId("androidApplication")) + apply(libs.findPluginId("jetbrainsCompose")) + apply(libs.findPluginId("composeCompiler")) + apply(libs.findPluginId("ksp")) + apply(libs.findPluginId("serialization")) + } + + extensions.configure { + val kspExtension = extensions.getByType() + configureKotlinMultiplatform(this, kspExtension) + configureKMPCompose( + extension = this, + compose = extensions.getByType().dependencies + ) + } + + extensions.configure { + configureKotlin() + configureKotlinAndroid( + extension = this, + isApp = true + ) + configureKotlinAndroidCompose(this) + defaultConfig.apply { + applicationId = APP_PREFIX + targetSdk = libs.findVersionInt("targetSdk") + versionName = libs.findVersionString("versionName") + versionCode = libs.findVersionInt("versionCode") + } + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/KMPLibraryComposeConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KMPLibraryComposeConventionPlugin.kt new file mode 100644 index 00000000..48a90d45 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/KMPLibraryComposeConventionPlugin.kt @@ -0,0 +1,44 @@ +import AppExt.findPluginId +import AppExt.libs +import com.android.build.api.dsl.LibraryExtension +import com.stslex.wizard.convention.configureKMPCompose +import com.stslex.wizard.convention.configureKotlin +import com.stslex.wizard.convention.configureKotlinAndroid +import com.stslex.wizard.convention.configureKotlinMultiplatform +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.compose.ComposeExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +class KMPLibraryComposeConventionPlugin : Plugin { + + override fun apply(target: Project): Unit = with(target) { + with(pluginManager) { + apply(libs.findPluginId("kotlinMultiplatform")) + apply(libs.findPluginId("jetbrainsCompose")) + apply(libs.findPluginId("composeCompiler")) + apply(libs.findPluginId("kotlinCocoapods")) + apply(libs.findPluginId("androidLibrary")) + apply(libs.findPluginId("ksp")) + apply(libs.findPluginId("serialization")) + } + + extensions.configure { + configureKMPCompose( + extension = this, + compose = extensions.getByType().dependencies + ) + configureKotlinMultiplatform( + extension = this, + kspExtension = extensions.getByType() + ) + } + + extensions.configure { + configureKotlin() + configureKotlinAndroid(this) + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/KMPLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KMPLibraryConventionPlugin.kt new file mode 100644 index 00000000..e607de43 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/KMPLibraryConventionPlugin.kt @@ -0,0 +1,35 @@ +import AppExt.findPluginId +import AppExt.libs +import com.android.build.api.dsl.LibraryExtension +import com.stslex.wizard.convention.configureKotlin +import com.stslex.wizard.convention.configureKotlinAndroid +import com.stslex.wizard.convention.configureKotlinMultiplatform +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +class KMPLibraryConventionPlugin : Plugin { + + override fun apply(target: Project): Unit = with(target) { + with(pluginManager) { + apply(libs.findPluginId("kotlinMultiplatform")) + apply(libs.findPluginId("kotlinCocoapods")) + apply(libs.findPluginId("androidLibrary")) + apply(libs.findPluginId("ksp")) + apply(libs.findPluginId("serialization")) + } + + extensions.configure { + configureKotlinMultiplatform( + extension = this, + kspExtension = extensions.getByType() + ) + } + extensions.configure { + configureKotlinAndroid(this) + configureKotlin() + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/KotlinLibraryComposePlugin.kt b/build-logic/convention/src/main/kotlin/KotlinLibraryComposePlugin.kt new file mode 100644 index 00000000..b9033acb --- /dev/null +++ b/build-logic/convention/src/main/kotlin/KotlinLibraryComposePlugin.kt @@ -0,0 +1,23 @@ +import AppExt.findPluginId +import AppExt.libs +import com.android.build.api.dsl.LibraryExtension +import com.stslex.wizard.convention.configureKotlin +import com.stslex.wizard.convention.configureKotlinAndroidCompose +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure + +class KotlinLibraryComposePlugin : Plugin { + + override fun apply(target: Project): Unit = with(target) { + with(pluginManager) { + apply(libs.findPluginId("androidLibrary")) + apply(libs.findPluginId("composeCompiler")) + apply(libs.findPluginId("ksp")) + } + extensions.configure { + configureKotlin() + configureKotlinAndroidCompose(this) + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/RoomLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/RoomLibraryConventionPlugin.kt new file mode 100644 index 00000000..e582a6a6 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/RoomLibraryConventionPlugin.kt @@ -0,0 +1,51 @@ +import AppExt.findPluginId +import AppExt.libs +import androidx.room.gradle.RoomExtension +import com.google.devtools.ksp.gradle.KspExtension +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +class RoomLibraryConventionPlugin : Plugin { + + override fun apply(target: Project) { + with(target) { + pluginManager.apply { + apply(libs.findPluginId("room")) + apply(libs.findPluginId("ksp")) + apply(libs.findPluginId("kotlinMultiplatform")) + apply(libs.findPluginId("serialization")) + } + + extensions.configure { + arg("room.generateKotlin", "true") + } + + extensions.configure { + // The schemas directory contains a schema file for each version of the Room database. + // This is required to enable Room auto migrations. + // See https://developer.android.com/reference/kotlin/androidx/room/AutoMigration. + schemaDirectory("$projectDir/schemas") + } + + extensions.configure { + dependencies { + val roomCompiler = libs.findLibrary("room-compiler").get() + add("kspAndroid", roomCompiler) + add("kspIosSimulatorArm64", roomCompiler) + add("kspIosX64", roomCompiler) + add("kspIosArm64", roomCompiler) + } + sourceSets.apply { + commonMain.dependencies { + implementation(libs.findLibrary("room-runtime").get()) + implementation(libs.findLibrary("sqlite-bundled").get()) + implementation(libs.findLibrary("sqlite").get()) + } + } + } + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KmpCompose.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KmpCompose.kt new file mode 100644 index 00000000..35d69827 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KmpCompose.kt @@ -0,0 +1,28 @@ +package com.stslex.wizard.convention + +import AppExt.libs +import org.gradle.api.Project +import org.jetbrains.compose.ComposePlugin +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +fun Project.configureKMPCompose( + extension: KotlinMultiplatformExtension, + compose: ComposePlugin.Dependencies +) = extension.apply { + sourceSets.apply { + commonMain.dependencies { + // todo need to add compose dependencies + implementation(compose.ui) + implementation(compose.material3) + implementation(compose.material) + implementation(compose.foundation) + implementation(compose.components.uiToolingPreview) + implementation(compose.components.resources) + implementation(compose.runtime) + implementation(libs.findLibrary("kotlinx-collections-immutable").get()) + implementation(libs.findLibrary("koin-compose").get()) + implementation(libs.findLibrary("lifecycle-viewmodel").get()) + implementation(libs.findLibrary("kamel").get()) + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroid.kt new file mode 100644 index 00000000..fb65c6f9 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroid.kt @@ -0,0 +1,51 @@ +package com.stslex.wizard.convention + +import AppExt.APP_PREFIX +import AppExt.findVersionInt +import AppExt.libs +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureKotlinAndroid( + extension: CommonExtension<*, *, *, *, *, *>, + isApp: Boolean = false +) = extension.apply { + + //get module name from module path + val dropValue = if (isApp) 2 else 1 + val moduleName = path.split(":") + .drop(dropValue) + .joinToString(".") + namespace = if (moduleName.isNotEmpty()) "$APP_PREFIX.$moduleName" else APP_PREFIX + + println("android namespace: $namespace") + + compileSdk = libs.findVersionInt("compileSdk") + + defaultConfig { + minSdk = libs.findVersionInt("minSdk") + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } + + buildFeatures { + buildConfig = true + } + + dependencies { + "implementation"(libs.findLibrary("koin-core").get()) + "implementation"(libs.findLibrary("koin-annotations").get()) + "implementation"(libs.findLibrary("koin-android").get()) + "implementation"(libs.findLibrary("coroutine-core").get()) + "implementation"(libs.findLibrary("coroutine-android").get()) + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroidCompose.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroidCompose.kt new file mode 100644 index 00000000..12878890 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinAndroidCompose.kt @@ -0,0 +1,23 @@ +package com.stslex.wizard.convention + +import AppExt.findVersionString +import AppExt.libs +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.Project +import org.gradle.kotlin.dsl.dependencies + +fun Project.configureKotlinAndroidCompose( + commonExtension: CommonExtension<*, *, *, *, *, *>, +) = commonExtension.apply { + buildFeatures.compose = true + composeOptions.kotlinCompilerExtensionVersion = libs.findVersionString("compose-compiler") + + dependencies { + "implementation"(libs.findLibrary("compose.ui").get()) + "implementation"(libs.findLibrary("android.material").get()) + "implementation"(libs.findLibrary("compose.material3").get()) + "implementation"(libs.findLibrary("androidx.activity.compose").get()) + "implementation"(libs.findLibrary("compose.ui.tooling.preview").get()) + "debugImplementation"(libs.findLibrary("compose.ui.tooling").get()) + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinCocoaPods.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinCocoaPods.kt new file mode 100644 index 00000000..1891d502 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinCocoaPods.kt @@ -0,0 +1,24 @@ +package com.stslex.wizard.convention + +import org.gradle.api.Project +import org.jetbrains.kotlin.gradle.plugin.cocoapods.CocoapodsExtension + +internal fun Project.configureKotlinCocoapods( + extension: CocoapodsExtension +) = extension.apply { + val moduleName = this@configureKotlinCocoapods.path.split(":") + .drop(1) + .joinToString("-") + println("ios moduleName: $moduleName") + + summary = "Some description for the Shared Module" + homepage = "Link to the Shared Module homepage" + version = "1.0" //your cocoapods version + ios.deploymentTarget = "16.0" //your iOS deployment target + name = moduleName + framework { + baseName = moduleName + isStatic = true //static or dynamic according to your project + binaryOptions["bundleId"] = moduleName + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinConfigure.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinConfigure.kt new file mode 100644 index 00000000..87abf382 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinConfigure.kt @@ -0,0 +1,14 @@ +package com.stslex.wizard.convention + +import org.gradle.api.Project +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon + +fun Project.configureKotlin() { + tasks.withType().configureEach { + @Suppress("Deprecation") + kotlinOptions { + freeCompilerArgs = freeCompilerArgs + "-Xexpect-actual-classes" + } + } +} \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinMultiplatform.kt new file mode 100644 index 00000000..c9485fff --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/stslex/wizard/convention/KotlinMultiplatform.kt @@ -0,0 +1,63 @@ +package com.stslex.wizard.convention + +import AppExt.libs +import com.google.devtools.ksp.gradle.KspExtension +import org.gradle.api.Project +import org.gradle.api.plugins.ExtensionAware +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.plugin.cocoapods.CocoapodsExtension + +internal fun Project.configureKotlinMultiplatform( + extension: KotlinMultiplatformExtension, + kspExtension: KspExtension +) = extension.apply { + kspExtension.arg("KOIN_CONFIG_CHECK", true.toString()) + + jvmToolchain(17) + + // targets + androidTarget() + iosArm64() + iosX64() + iosSimulatorArm64() + + applyDefaultHierarchyTemplate() + + //common dependencies + sourceSets.apply { + dependencies { + val koinCompiler = libs.findLibrary("koin-ksp-compiler").get() + add("kspAndroid", koinCompiler) + add("kspIosSimulatorArm64", koinCompiler) + add("kspIosX64", koinCompiler) + add("kspIosArm64", koinCompiler) + } + commonMain { + dependencies { + implementation(libs.findLibrary("koin-core").get()) + implementation(libs.findLibrary("koin-annotations").get()) + implementation(libs.findLibrary("coroutine-core").get()) + implementation(libs.findLibrary("kotlinx-serialization-json").get()) + } + } + + androidMain { + dependencies { + implementation(libs.findLibrary("koin-android").get()) + implementation(libs.findLibrary("coroutine-core").get()) + implementation(libs.findLibrary("coroutine-android").get()) + } + } + + commonTest { + dependencies { + implementation(kotlin("test")) + } + } + } + + //applying the Cocoapods Configuration we made + (this as ExtensionAware).extensions.configure(::configureKotlinCocoapods) +} \ No newline at end of file diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties new file mode 100644 index 00000000..6977b719 --- /dev/null +++ b/build-logic/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true \ No newline at end of file diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 00000000..a249d720 --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,17 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +rootProject.name = "build-logic" +include(":convention") \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index fa92730f..5249a5f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,13 @@ plugins { - // this is necessary to avoid the plugins to be loaded multiple times - // in each subproject's classloader - alias(libs.plugins.kotlinJvm) apply false - alias(libs.plugins.jetbrainsCompose) apply false - alias(libs.plugins.androidApplication) apply false - alias(libs.plugins.androidLibrary) apply false - alias(libs.plugins.kotlinMultiplatform) apply false - alias(libs.plugins.jetbrainsKotlinAndroid) apply false + alias(libs.plugins.androidApplication).apply(false) + alias(libs.plugins.androidLibrary).apply(false) + alias(libs.plugins.kotlinAndroid).apply(false) + alias(libs.plugins.kotlinMultiplatform).apply(false) alias(libs.plugins.kotlinCocoapods).apply(false) + alias(libs.plugins.jetbrainsCompose).apply(false) + alias(libs.plugins.composeCompiler).apply(false) + alias(libs.plugins.ksp).apply(false) + alias(libs.plugins.room).apply(false) + alias(libs.plugins.serialization).apply(false) + alias(libs.plugins.buildConfig).apply(false) } \ No newline at end of file diff --git a/commonApp/build.gradle.kts b/commonApp/build.gradle.kts new file mode 100644 index 00000000..c6ab17e9 --- /dev/null +++ b/commonApp/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + alias(libs.plugins.convention.kmp.application) +} + +kotlin { + sourceSets.apply { + commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:network")) + implementation(project(":core:database")) + implementation(project(":core:ui")) + + implementation(project(":feature:film_feed")) + implementation(project(":feature:film")) + implementation(project(":feature:profile")) + implementation(project(":feature:match_feed")) + implementation(project(":feature:auth")) + implementation(project(":feature:follower")) + implementation(project(":feature:favourite")) + implementation(project(":feature:settings")) + implementation(project(":feature:match")) + } + } +} \ No newline at end of file diff --git a/composeApp/proguard-rules.pro b/commonApp/proguard-rules.pro similarity index 100% rename from composeApp/proguard-rules.pro rename to commonApp/proguard-rules.pro diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/commonApp/src/androidMain/AndroidManifest.xml similarity index 100% rename from composeApp/src/androidMain/AndroidManifest.xml rename to commonApp/src/androidMain/AndroidManifest.xml diff --git a/composeApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt b/commonApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt similarity index 94% rename from composeApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt rename to commonApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt index bdeed2d6..6dbfa9a8 100644 --- a/composeApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt +++ b/commonApp/src/androidMain/kotlin/com/stslex/wizard/MainActivity.kt @@ -1,13 +1,11 @@ package com.stslex.wizard -import App import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview -import org.koin.android.BuildConfig import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidLogger diff --git a/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/commonApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml rename to commonApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml diff --git a/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml b/commonApp/src/androidMain/res/drawable/ic_launcher_background.xml similarity index 100% rename from composeApp/src/androidMain/res/drawable/ic_launcher_background.xml rename to commonApp/src/androidMain/res/drawable/ic_launcher_background.xml diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/commonApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to commonApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/commonApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to commonApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/commonApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png rename to commonApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png b/commonApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png rename to commonApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/commonApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png rename to commonApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png b/commonApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png rename to commonApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/commonApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png rename to commonApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png b/commonApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png rename to commonApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/commonApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png rename to commonApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png b/commonApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png rename to commonApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/commonApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png rename to commonApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png b/commonApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png rename to commonApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/composeApp/src/androidMain/res/values/strings.xml b/commonApp/src/androidMain/res/values/strings.xml similarity index 100% rename from composeApp/src/androidMain/res/values/strings.xml rename to commonApp/src/androidMain/res/values/strings.xml diff --git a/composeApp/src/androidMain/res/xml/network_security_config.xml b/commonApp/src/androidMain/res/xml/network_security_config.xml similarity index 100% rename from composeApp/src/androidMain/res/xml/network_security_config.xml rename to commonApp/src/androidMain/res/xml/network_security_config.xml diff --git a/commonApp/src/commonMain/kotlin/com/stslex/wizard/App.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/App.kt new file mode 100644 index 00000000..0f8bcdf6 --- /dev/null +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/App.kt @@ -0,0 +1,59 @@ +package com.stslex.wizard + +import androidx.compose.runtime.Composable +import com.stslex.wizard.core.core.coreModule +import com.stslex.wizard.core.database.di.coreDatabaseModule +import com.stslex.wizard.core.database.di.userSettingsModule +import com.stslex.wizard.core.network.di.coreNetworkModule +import com.stslex.wizard.core.ui.di.coreUiModule +import com.stslex.wizard.core.ui.theme.AppTheme +import com.stslex.wizard.di.appModule +import com.stslex.wizard.feature.auth.di.featureAuthModule +import com.stslex.wizard.feature.favourite.di.featureFavouriteModule +import com.stslex.wizard.feature.film.di.featureFilmModule +import com.stslex.wizard.feature.film_feed.di.featureFeedModule +import com.stslex.wizard.feature.follower.di.featureFollowerModule +import com.stslex.wizard.feature.match.di.featureMatchModule +import com.stslex.wizard.feature.match_feed.di.featureMatchFeedModule +import com.stslex.wizard.feature.profile.di.featureProfileModule +import com.stslex.wizard.feature.settings.di.featureSettingsModule +import org.koin.compose.KoinApplication +import org.koin.core.KoinApplication + +@Composable +fun App( + additionalSetup: KoinApplication.() -> Unit = {}, +) { + KoinApplication( + application = { + setupCommonModules() + additionalSetup() + } + ) { + AppTheme { + InitialApp() + } + } +} + +private fun KoinApplication.setupCommonModules() { + modules( + listOf( + appModule, + coreModule, + coreUiModule, + coreNetworkModule, + userSettingsModule, + coreDatabaseModule, + featureFeedModule, + featureFilmModule, + featureProfileModule, + featureMatchFeedModule, + featureAuthModule, + featureFollowerModule, + featureFavouriteModule, + featureSettingsModule, + featureMatchModule + ) + ) +} diff --git a/composeApp/src/commonMain/kotlin/InitialApp.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/InitialApp.kt similarity index 83% rename from composeApp/src/commonMain/kotlin/InitialApp.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/InitialApp.kt index 7b22fb7d..ef4165f1 100644 --- a/composeApp/src/commonMain/kotlin/InitialApp.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/InitialApp.kt @@ -1,3 +1,5 @@ +package com.stslex.wizard + import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -9,11 +11,11 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.transitions.SlideTransition -import com.stslex.core.network.utils.token.AuthController -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.auth.ui.AuthScreen -import main_screen.MainScreen +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.auth.ui.AuthScreen +import com.stslex.wizard.main_screen.MainScreen import org.koin.compose.getKoin @Composable diff --git a/commonApp/src/commonMain/kotlin/com/stslex/wizard/di/appModule.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/di/appModule.kt new file mode 100644 index 00000000..e1c4c296 --- /dev/null +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/di/appModule.kt @@ -0,0 +1,11 @@ +package com.stslex.wizard.di + +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.navigator.AppNavigatorImpl +import org.koin.dsl.module + +val appModule = module { + single { + AppNavigatorImpl() + } +} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/main_screen/MainScreen.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/MainScreen.kt similarity index 82% rename from composeApp/src/commonMain/kotlin/main_screen/MainScreen.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/MainScreen.kt index 76ef6c88..161f35e9 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/MainScreen.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/MainScreen.kt @@ -1,4 +1,4 @@ -package main_screen +package com.stslex.wizard.main_screen import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -9,9 +9,9 @@ import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen import cafe.adriel.voyager.navigator.tab.CurrentTab import cafe.adriel.voyager.navigator.tab.TabNavigator -import com.stslex.core.ui.mvi.setupNavigator -import main_screen.bottom_nav_bar.BottomNavigationBar -import main_screen.bottom_nav_bar.BottomNavigationTabs +import com.stslex.wizard.core.ui.mvi.setupNavigator +import com.stslex.wizard.main_screen.bottom_nav_bar.BottomNavigationBar +import com.stslex.wizard.main_screen.bottom_nav_bar.BottomNavigationTabs object MainScreen : Screen { diff --git a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationBar.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationBar.kt similarity index 96% rename from composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationBar.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationBar.kt index 56582ce0..f57b4e45 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationBar.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationBar.kt @@ -1,4 +1,4 @@ -package main_screen.bottom_nav_bar +package com.stslex.wizard.main_screen.bottom_nav_bar import androidx.compose.foundation.layout.RowScope import androidx.compose.material3.Icon diff --git a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationTabs.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationTabs.kt similarity index 76% rename from composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationTabs.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationTabs.kt index 59c4f296..e4fdf2b4 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/BottomNavigationTabs.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/BottomNavigationTabs.kt @@ -1,4 +1,4 @@ -package main_screen.bottom_nav_bar +package com.stslex.wizard.main_screen.bottom_nav_bar import cafe.adriel.voyager.navigator.tab.Tab diff --git a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/FeedTab.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/FeedTab.kt similarity index 90% rename from composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/FeedTab.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/FeedTab.kt index 44a896bc..af17e2e0 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/FeedTab.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/FeedTab.kt @@ -1,4 +1,4 @@ -package main_screen.bottom_nav_bar +package com.stslex.wizard.main_screen.bottom_nav_bar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.List @@ -9,7 +9,7 @@ import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.tab.Tab import cafe.adriel.voyager.navigator.tab.TabOptions import cafe.adriel.voyager.transitions.SlideTransition -import com.stslex.feature.film_feed.ui.FeedScreen +import com.stslex.wizard.feature.film_feed.ui.FeedScreen object FeedTab : Tab { diff --git a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/MatchTab.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/MatchTab.kt similarity index 83% rename from composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/MatchTab.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/MatchTab.kt index fc31b525..f33acc20 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/MatchTab.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/MatchTab.kt @@ -1,4 +1,4 @@ -package main_screen.bottom_nav_bar +package com.stslex.wizard.main_screen.bottom_nav_bar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.PlayArrow @@ -8,8 +8,8 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.tab.Tab import cafe.adriel.voyager.navigator.tab.TabOptions -import com.stslex.core.ui.navigation.args.MatchScreenArgs -import com.stslex.feature.match.ui.MatchScreen +import com.stslex.wizard.core.ui.navigation.args.MatchScreenArgs +import com.stslex.wizard.feature.match.ui.MatchScreen object MatchTab : Tab { diff --git a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/ProfileTab.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/ProfileTab.kt similarity index 83% rename from composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/ProfileTab.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/ProfileTab.kt index 391f6440..94998067 100644 --- a/composeApp/src/commonMain/kotlin/main_screen/bottom_nav_bar/ProfileTab.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/main_screen/bottom_nav_bar/ProfileTab.kt @@ -1,4 +1,4 @@ -package main_screen.bottom_nav_bar +package com.stslex.wizard.main_screen.bottom_nav_bar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.AccountBox @@ -8,8 +8,8 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.tab.Tab import cafe.adriel.voyager.navigator.tab.TabOptions -import com.stslex.feature.profile.navigation.ProfileScreenArguments -import com.stslex.feature.profile.ui.ProfileScreen +import com.stslex.wizard.feature.profile.navigation.ProfileScreenArguments +import com.stslex.wizard.feature.profile.ui.ProfileScreen object ProfileTab : Tab { diff --git a/composeApp/src/commonMain/kotlin/navigator/AppNavigatorImpl.kt b/commonApp/src/commonMain/kotlin/com/stslex/wizard/navigator/AppNavigatorImpl.kt similarity index 72% rename from composeApp/src/commonMain/kotlin/navigator/AppNavigatorImpl.kt rename to commonApp/src/commonMain/kotlin/com/stslex/wizard/navigator/AppNavigatorImpl.kt index eefcc306..bd5a84ff 100644 --- a/composeApp/src/commonMain/kotlin/navigator/AppNavigatorImpl.kt +++ b/commonApp/src/commonMain/kotlin/com/stslex/wizard/navigator/AppNavigatorImpl.kt @@ -1,17 +1,17 @@ -package navigator +package com.stslex.wizard.navigator import cafe.adriel.voyager.navigator.Navigator -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.auth.ui.AuthScreen -import com.stslex.feature.favourite.FavouriteScreen -import com.stslex.feature.film.ui.FilmScreen -import com.stslex.feature.follower.navigation.FollowerScreenArgs -import com.stslex.feature.follower.ui.FollowerScreen -import com.stslex.feature.match.ui.MatchScreen -import com.stslex.feature.match_feed.ui.MatchFeedScreen -import com.stslex.feature.settings.ui.SettingsScreen -import main_screen.MainScreen +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.auth.ui.AuthScreen +import com.stslex.wizard.feature.favourite.FavouriteScreen +import com.stslex.wizard.feature.film.ui.FilmScreen +import com.stslex.wizard.feature.follower.navigation.FollowerScreenArgs +import com.stslex.wizard.feature.follower.ui.FollowerScreen +import com.stslex.wizard.feature.match.ui.MatchScreen +import com.stslex.wizard.feature.match_feed.ui.MatchFeedScreen +import com.stslex.wizard.feature.settings.ui.SettingsScreen +import com.stslex.wizard.main_screen.MainScreen class AppNavigatorImpl : AppNavigator { diff --git a/composeApp/src/iosMain/kotlin/MainViewController.kt b/commonApp/src/iosMain/kotlin/com/stslex/wizard/MainViewController.kt similarity index 81% rename from composeApp/src/iosMain/kotlin/MainViewController.kt rename to commonApp/src/iosMain/kotlin/com/stslex/wizard/MainViewController.kt index f4838848..45a31c76 100644 --- a/composeApp/src/iosMain/kotlin/MainViewController.kt +++ b/commonApp/src/iosMain/kotlin/com/stslex/wizard/MainViewController.kt @@ -1,3 +1,5 @@ +package com.stslex.wizard + import androidx.compose.ui.window.ComposeUIViewController fun MainViewController() = ComposeUIViewController { App() } diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts deleted file mode 100644 index 2964121e..00000000 --- a/composeApp/build.gradle.kts +++ /dev/null @@ -1,112 +0,0 @@ -plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidApplication) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) -} - -kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file("../iosApp/Podfile") - framework { - baseName = "ComposeApp" - isStatic = true - } - } - - sourceSets { - - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:network")) - implementation(project(":core:database")) - implementation(project(":core:ui")) - implementation(project(":feature:film_feed")) - implementation(project(":feature:film")) - implementation(project(":feature:profile")) - implementation(project(":feature:match_feed")) - implementation(project(":feature:auth")) - implementation(project(":feature:follower")) - implementation(project(":feature:favourite")) - implementation(project(":feature:settings")) - implementation(project(":feature:match")) - } - } -} - -android { - namespace = "com.stslex.wizard" - compileSdk = libs.versions.android.compileSdk.get().toInt() - - sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") - sourceSets["main"].res.srcDirs("src/androidMain/res") - sourceSets["main"].resources.srcDirs("src/commonMain/resources") - - defaultConfig { - applicationId = "com.stslex.wizard" - minSdk = libs.versions.android.minSdk.get().toInt() - targetSdk = libs.versions.android.targetSdk.get().toInt() - versionCode = 1 - versionName = "1.0" - } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - dependencies { - debugImplementation(libs.compose.ui.tooling) - } -} -dependencies { - implementation(project(":feature:settings")) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/App.kt b/composeApp/src/commonMain/kotlin/App.kt deleted file mode 100644 index 90ad4e7a..00000000 --- a/composeApp/src/commonMain/kotlin/App.kt +++ /dev/null @@ -1,57 +0,0 @@ -import androidx.compose.runtime.Composable -import com.stslex.core.core.coreModule -import com.stslex.core.database.di.coreDatabaseModule -import com.stslex.core.database.di.userSettingsModule -import com.stslex.core.network.di.coreNetworkModule -import com.stslex.core.ui.di.coreUiModule -import com.stslex.core.ui.theme.AppTheme -import com.stslex.feature.auth.di.featureAuthModule -import com.stslex.feature.favourite.di.featureFavouriteModule -import com.stslex.feature.film.di.featureFilmModule -import com.stslex.feature.film_feed.di.featureFeedModule -import com.stslex.feature.follower.di.featureFollowerModule -import com.stslex.feature.match.di.featureMatchModule -import com.stslex.feature.match_feed.di.featureMatchFeedModule -import com.stslex.feature.profile.di.featureProfileModule -import com.stslex.feature.settings.di.featureSettingsModule -import di.appModule -import org.koin.compose.KoinApplication -import org.koin.core.KoinApplication - -@Composable -fun App( - additionalSetup: KoinApplication.() -> Unit = {}, -) { - KoinApplication( - application = { - setupCommonModules() - additionalSetup() - } - ) { - AppTheme { - InitialApp() - } - } -} - -private fun KoinApplication.setupCommonModules() { - modules( - listOf( - appModule, - coreModule, - coreUiModule, - coreNetworkModule, - userSettingsModule, - coreDatabaseModule, - featureFeedModule, - featureFilmModule, - featureProfileModule, - featureMatchFeedModule, - featureAuthModule, - featureFollowerModule, - featureFavouriteModule, - featureSettingsModule, - featureMatchModule - ) - ) -} diff --git a/composeApp/src/commonMain/kotlin/di/appModule.kt b/composeApp/src/commonMain/kotlin/di/appModule.kt deleted file mode 100644 index bd704214..00000000 --- a/composeApp/src/commonMain/kotlin/di/appModule.kt +++ /dev/null @@ -1,11 +0,0 @@ -package di - -import com.stslex.core.ui.navigation.AppNavigator -import navigator.AppNavigatorImpl -import org.koin.dsl.module - -val appModule = module { - single { - AppNavigatorImpl() - } -} \ No newline at end of file diff --git a/core/core/build.gradle.kts b/core/core/build.gradle.kts index 173f7bad..fae51e1a 100644 --- a/core/core/build.gradle.kts +++ b/core/core/build.gradle.kts @@ -1,59 +1,11 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) - alias(libs.plugins.kotlinSerialization) + alias(libs.plugins.convention.kmp.library) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/CorePodfile") - framework { - baseName = "core" - } - } - sourceSets { commonMain.dependencies { implementation(libs.kermit) - implementation(compose.runtime) - implementation(compose.foundation) - api(libs.koin.core) - api(libs.koin.compose) - api(libs.kotlinx.collections.immutable) - api(libs.coroutines.core) - implementation(libs.kotlinx.serialization.json) } - androidMain.dependencies { - api(libs.coroutines.android) - api(libs.koin.android) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.core.core" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() } } diff --git a/core/core/src/androidMain/kotlin/com/stslex/core/core/CommonUtils.android.kt b/core/core/src/androidMain/kotlin/com/stslex/wizard/core/core/CommonUtils.android.kt similarity index 70% rename from core/core/src/androidMain/kotlin/com/stslex/core/core/CommonUtils.android.kt rename to core/core/src/androidMain/kotlin/com/stslex/wizard/core/core/CommonUtils.android.kt index 43a26de6..f573e36a 100644 --- a/core/core/src/androidMain/kotlin/com/stslex/core/core/CommonUtils.android.kt +++ b/core/core/src/androidMain/kotlin/com/stslex/wizard/core/core/CommonUtils.android.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import java.util.UUID diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcher.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcher.kt similarity index 86% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcher.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcher.kt index 1219ce90..cd52ae03 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcher.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcher.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.MainCoroutineDispatcher diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcherImpl.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcherImpl.kt similarity index 91% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcherImpl.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcherImpl.kt index c368ba52..8487090b 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/AppDispatcherImpl.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/AppDispatcherImpl.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/CommonUtils.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CommonUtils.kt similarity index 92% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/CommonUtils.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CommonUtils.kt index 0da39fbe..be638b87 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/CommonUtils.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CommonUtils.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.async diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/CoreModule.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CoreModule.kt similarity index 80% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/CoreModule.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CoreModule.kt index c1bc8736..1f10ab7d 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/CoreModule.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/CoreModule.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import org.koin.core.module.dsl.singleOf import org.koin.dsl.module diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/Logger.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/Logger.kt similarity index 95% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/Logger.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/Logger.kt index 2c7aab5b..e6552291 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/Logger.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/Logger.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import co.touchlab.kermit.Logger as Log diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScope.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScope.kt similarity index 92% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScope.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScope.kt index bacbffa6..a23a06cb 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScope.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScope.kt @@ -1,6 +1,6 @@ -package com.stslex.core.core.coroutine +package com.stslex.wizard.core.core.coroutine -import com.stslex.core.core.AppDispatcher +import com.stslex.wizard.core.core.AppDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Job diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScopeImpl.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt similarity index 87% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScopeImpl.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt index 38956cf4..aca1c3c5 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/coroutine/AppCoroutineScopeImpl.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.core.core.coroutine +package com.stslex.wizard.core.core.coroutine -import com.stslex.core.core.AppDispatcher -import com.stslex.core.core.Logger -import com.stslex.core.core.coroutineExceptionHandler +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.core.coroutineExceptionHandler import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreData.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreData.kt similarity index 93% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreData.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreData.kt index e8125012..2a47a842 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreData.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreData.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core.paging +package com.stslex.wizard.core.core.paging interface PagingCoreData { val page: Int diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreItem.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreItem.kt similarity index 53% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreItem.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreItem.kt index e00f7fbd..e533fa68 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingCoreItem.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingCoreItem.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core.paging +package com.stslex.wizard.core.core.paging interface PagingCoreItem { val uuid: String diff --git a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingResponse.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingResponse.kt similarity index 89% rename from core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingResponse.kt rename to core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingResponse.kt index 2577def2..580910e4 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/core/core/paging/PagingResponse.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/paging/PagingResponse.kt @@ -1,6 +1,6 @@ -package com.stslex.core.core.paging +package com.stslex.wizard.core.core.paging -import com.stslex.core.core.asyncMap +import com.stslex.wizard.core.core.asyncMap import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/core/src/iosMain/kotlin/com/stslex/core/core/CommonUtils.ios.kt b/core/core/src/iosMain/kotlin/com/stslex/wizard/core/core/CommonUtils.ios.kt similarity index 71% rename from core/core/src/iosMain/kotlin/com/stslex/core/core/CommonUtils.ios.kt rename to core/core/src/iosMain/kotlin/com/stslex/wizard/core/core/CommonUtils.ios.kt index b19c0ca5..f5399bc4 100644 --- a/core/core/src/iosMain/kotlin/com/stslex/core/core/CommonUtils.ios.kt +++ b/core/core/src/iosMain/kotlin/com/stslex/wizard/core/core/CommonUtils.ios.kt @@ -1,4 +1,4 @@ -package com.stslex.core.core +package com.stslex.wizard.core.core import platform.Foundation.NSUUID diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index 4ca813b3..a188a3ab 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -1,50 +1,12 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) - kotlin("plugin.serialization") version "1.9.20" + alias(libs.plugins.convention.kmp.library) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/CoreDatabasePodfile") - framework { - baseName = "coreDatabase" - } - } - sourceSets { commonMain.dependencies { implementation(project(":core:core")) - implementation(libs.kotlinx.serialization.json) - implementation("com.russhwolf:multiplatform-settings:1.1.1") - } - commonTest.dependencies { - implementation(libs.kotlin.test) + implementation(libs.multiplatformSettings) } } } - -android { - namespace = "com.stslex.core.database" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} diff --git a/core/database/src/androidMain/kotlin/com/stslex/core/database/di/DatabaseModel.android.kt b/core/database/src/androidMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.android.kt similarity index 73% rename from core/database/src/androidMain/kotlin/com/stslex/core/database/di/DatabaseModel.android.kt rename to core/database/src/androidMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.android.kt index 58147624..aff94bd9 100644 --- a/core/database/src/androidMain/kotlin/com/stslex/core/database/di/DatabaseModel.android.kt +++ b/core/database/src/androidMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.android.kt @@ -1,9 +1,9 @@ -package com.stslex.core.database.di +package com.stslex.wizard.core.database.di import android.content.Context import com.russhwolf.settings.SharedPreferencesSettings -import com.stslex.core.database.store.UserSettings -import com.stslex.core.database.store.UserSettingsImpl +import com.stslex.wizard.core.database.store.UserSettings +import com.stslex.wizard.core.database.store.UserSettingsImpl import org.koin.android.ext.koin.androidContext import org.koin.dsl.module diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/di/DatabaseModel.kt b/core/database/src/commonMain/kotlin/com/stslex/core/database/di/DatabaseModel.kt deleted file mode 100644 index 34d27991..00000000 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/di/DatabaseModel.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.stslex.core.database.di - -import com.stslex.core.database.sources.source.FavouriteFilmDataSource -import com.stslex.core.database.sources.source.FavouriteFilmDataSourceImpl -import com.stslex.core.database.store.UserStore -import com.stslex.core.database.store.UserStoreImpl -import org.koin.core.module.Module -import org.koin.dsl.module - -val coreDatabaseModule = module { - single { FavouriteFilmDataSourceImpl() } - single { UserStoreImpl(userSettings = get()) } -} - -expect val userSettingsModule: Module \ No newline at end of file diff --git a/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.kt new file mode 100644 index 00000000..2f06f97b --- /dev/null +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.kt @@ -0,0 +1,15 @@ +package com.stslex.wizard.core.database.di + +import com.stslex.wizard.core.database.sources.source.FavouriteFilmDataSource +import com.stslex.wizard.core.database.sources.source.FavouriteFilmDataSourceImpl +import com.stslex.wizard.core.database.store.UserStore +import com.stslex.wizard.core.database.store.UserStoreImpl +import org.koin.core.module.Module +import org.koin.dsl.module + +val coreDatabaseModule = module { + single { FavouriteFilmDataSourceImpl() } + single { UserStoreImpl(userSettings = get()) } +} + +expect val userSettingsModule: Module \ No newline at end of file diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/model/FilmEntity.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/model/FilmEntity.kt similarity index 87% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/sources/model/FilmEntity.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/model/FilmEntity.kt index b1cfa61c..da24abe4 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/model/FilmEntity.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/model/FilmEntity.kt @@ -1,4 +1,4 @@ -package com.stslex.core.database.sources.model +package com.stslex.wizard.core.database.sources.model data class FilmEntity( val id: String, diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSource.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSource.kt similarity index 60% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSource.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSource.kt index 8f71ed98..db6e4060 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSource.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSource.kt @@ -1,6 +1,6 @@ -package com.stslex.core.database.sources.source +package com.stslex.wizard.core.database.sources.source -import com.stslex.core.database.sources.model.FilmEntity +import com.stslex.wizard.core.database.sources.model.FilmEntity interface FavouriteFilmDataSource { diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSourceImpl.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSourceImpl.kt similarity index 76% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSourceImpl.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSourceImpl.kt index da825e61..95c7b3bd 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/sources/source/FavouriteFilmDataSourceImpl.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/sources/source/FavouriteFilmDataSourceImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.core.database.sources.source +package com.stslex.wizard.core.database.sources.source -import com.stslex.core.database.sources.model.FilmEntity +import com.stslex.wizard.core.database.sources.model.FilmEntity class FavouriteFilmDataSourceImpl : FavouriteFilmDataSource { diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserSettings.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserSettings.kt similarity index 83% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserSettings.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserSettings.kt index 3404b0c4..d6ebeab4 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserSettings.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserSettings.kt @@ -1,4 +1,4 @@ -package com.stslex.core.database.store +package com.stslex.wizard.core.database.store import com.russhwolf.settings.Settings diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStore.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStore.kt similarity index 76% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStore.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStore.kt index cef7d36c..75eef935 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStore.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStore.kt @@ -1,4 +1,4 @@ -package com.stslex.core.database.store +package com.stslex.wizard.core.database.store interface UserStore { diff --git a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStoreImpl.kt b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStoreImpl.kt similarity index 96% rename from core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStoreImpl.kt rename to core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStoreImpl.kt index 6c981c19..e8afdd54 100644 --- a/core/database/src/commonMain/kotlin/com/stslex/core/database/store/UserStoreImpl.kt +++ b/core/database/src/commonMain/kotlin/com/stslex/wizard/core/database/store/UserStoreImpl.kt @@ -1,4 +1,4 @@ -package com.stslex.core.database.store +package com.stslex.wizard.core.database.store import com.russhwolf.settings.set diff --git a/core/database/src/appleMain/kotlin/com/stslex/core/database/di/DatabaseModel.apple.kt b/core/database/src/iosMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.ios.kt similarity index 70% rename from core/database/src/appleMain/kotlin/com/stslex/core/database/di/DatabaseModel.apple.kt rename to core/database/src/iosMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.ios.kt index c31d73d4..5c8ebf46 100644 --- a/core/database/src/appleMain/kotlin/com/stslex/core/database/di/DatabaseModel.apple.kt +++ b/core/database/src/iosMain/kotlin/com/stslex/wizard/core/database/di/DatabaseModel.ios.kt @@ -1,9 +1,9 @@ -package com.stslex.core.database.di +package com.stslex.wizard.core.database.di import com.russhwolf.settings.NSUserDefaultsSettings import com.russhwolf.settings.Settings -import com.stslex.core.database.store.UserSettings -import com.stslex.core.database.store.UserSettingsImpl +import com.stslex.wizard.core.database.store.UserSettings +import com.stslex.wizard.core.database.store.UserSettingsImpl import org.koin.dsl.module import platform.Foundation.NSUserDefaults diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 7f4d2c1b..de198067 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -1,86 +1,41 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties import com.github.gmazzo.gradle.plugins.BuildConfigExtension +import java.util.Properties plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) - alias(libs.plugins.kotlinSerialization) + alias(libs.plugins.convention.kmp.library) alias(libs.plugins.buildConfig) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/CoreNetworkPodfile") - framework { - baseName = "coreNetwork" - } - } - sourceSets { commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:database")) implementation(libs.bundles.ktor) - implementation(libs.kotlinx.serialization.json) implementation(libs.slf4j.simple) - implementation(libs.kamel) } - commonTest.dependencies { - implementation(libs.kotlin.test) - } buildConfig { setLocalProperty(project.rootProject) } } } -android { - namespace = "com.stslex.core.network" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} +fun BuildConfigExtension.setLocalProperty(dir: Project) { + val localProperties = gradleLocalProperties(dir.projectDir, providers) + buildStringField(localProperties, "KINOPOISK_API_KEY") + buildStringField(localProperties, "SERVER_HOST") + buildStringField(localProperties, "SERVER_API_VERSION") + buildStringField(localProperties, "SERVER_PORT") + buildStringField(localProperties, "SERVER_API_KEY") +} -fun BuildConfigExtension.setLocalProperty(dir: Project) { - val key = gradleLocalProperties(dir.projectDir)["KINOPOISK_API_KEY"] - ?.toString() - ?: throw IllegalStateException("KINOPOISK_API_KEY should be initialised") - val serverHost = gradleLocalProperties(dir.projectDir)["SERVER_HOST"] - ?.toString() - ?: throw IllegalStateException("SERVER_HOST should be initialised") - val serverApiVersion = gradleLocalProperties(dir.projectDir)["SERVER_API_VERSION"] - ?.toString() - ?: throw IllegalStateException("SERVER_API_VERSION should be initialised") - val serverPort = gradleLocalProperties(dir.projectDir)["SERVER_PORT"] - ?.toString() - ?: throw IllegalStateException("SERVER_PORT should be initialised") - val serverApiKey = gradleLocalProperties(dir.projectDir)["SERVER_API_KEY"] - ?.toString() - ?: throw IllegalStateException("SERVER_API_KEY should be initialised") +fun BuildConfigExtension.buildStringField(localProperties: Properties, name: String) { + buildConfigField("String", name, localProperties.getString(name)) +} - buildConfigField("String", "KINOPOISK_API_KEY", key) - buildConfigField("String", "SERVER_HOST", serverHost) - buildConfigField("String", "SERVER_API_VERSION", serverApiVersion) - buildConfigField("String", "SERVER_PORT", serverPort) - buildConfigField("String", "SERVER_API_KEY", serverApiKey) +fun Properties.getString(key: String): String { + return getProperty(key) ?: throw IllegalStateException("$key should be initialised") } diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClient.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClient.kt deleted file mode 100644 index 32715062..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClient.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.stslex.core.network.api.kinopoisk.api - -import com.stslex.core.network.api.base.NetworkClient - -interface KinopoiskApiClient : NetworkClient diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt deleted file mode 100644 index d61fd815..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt +++ /dev/null @@ -1,96 +0,0 @@ -package com.stslex.core.network.api.kinopoisk.model - -import com.stslex.core.network.api.kinopoisk.model.network.FilmItemKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.FilmListKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.FilmProductionStatusNetwork -import com.stslex.core.network.api.kinopoisk.model.network.FilmTypeNetwork -import com.stslex.core.network.api.kinopoisk.model.network.MovieKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerItemKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerKinopoisk -import com.stslex.core.network.api.kinopoisk.model.response.FilmItemResponse -import com.stslex.core.network.api.kinopoisk.model.response.FilmListResponse -import com.stslex.core.network.api.kinopoisk.model.response.MovieResponse -import com.stslex.core.network.api.kinopoisk.model.response.TrailerItemResponse -import com.stslex.core.network.api.kinopoisk.model.response.TrailerResponse -import com.stslex.core.network.clients.film.model.TrailerSiteType - -fun FilmListResponse.toNetwork(): FilmListKinopoisk = FilmListKinopoisk( - total = total ?: 0, - totalPages = totalPages ?: 0, - items = items?.map { it.toNetwork() }.orEmpty() -) - -fun FilmItemResponse.toNetwork(): FilmItemKinopoisk = FilmItemKinopoisk( - kinopoiskId = kinopoiskId, - imdbId = imdbId.orEmpty(), - nameRu = nameRu.orEmpty(), - nameEn = nameEn.orEmpty(), - nameOriginal = nameOriginal.orEmpty(), - countries = countries?.map { it.country }.orEmpty(), - genres = genres?.map { it.genre }.orEmpty(), - ratingKinopoisk = ratingKinopoisk, - ratingImdb = ratingImdb, - year = year, - posterUrl = posterUrl.orEmpty(), - posterUrlPreview = posterUrlPreview.orEmpty(), - type = FilmTypeNetwork.getType(type.orEmpty()) -) - -fun TrailerResponse.toNetwork(): TrailerKinopoisk = TrailerKinopoisk( - total = total ?: 0, - items = items?.map { it.toNetwork() }.orEmpty() -) - -fun TrailerItemResponse.toNetwork(): TrailerItemKinopoisk = TrailerItemKinopoisk( - url = url.orEmpty(), - name = name.orEmpty(), - site = TrailerSiteType.getByValue(site.orEmpty()), -) - -fun MovieResponse.toNetwork(): MovieKinopoisk = MovieKinopoisk( - kinopoiskId = kinopoiskId, - kinopoiskHDId = kinopoiskHDId.orEmpty(), - imdbId = imdbId.orEmpty(), - nameRu = nameRu.orEmpty(), - nameEn = nameEn.orEmpty(), - nameOriginal = nameOriginal.orEmpty(), - posterUrl = posterUrl.orEmpty(), - posterUrlPreview = posterUrlPreview.orEmpty(), - coverUrl = coverUrl.orEmpty(), - logoUrl = logoUrl.orEmpty(), - reviewsCount = reviewsCount, - ratingGoodReview = ratingGoodReview, - ratingGoodReviewVoteCount = ratingGoodReviewVoteCount, - ratingKinopoisk = ratingKinopoisk, - ratingKinopoiskVoteCount = ratingKinopoiskVoteCount, - ratingImdb = ratingImdb, - ratingImdbVoteCount = ratingImdbVoteCount, - ratingFilmCritics = ratingFilmCritics, - ratingFilmCriticsVoteCount = ratingFilmCriticsVoteCount, - ratingAwait = ratingAwait, - ratingAwaitCount = ratingAwaitCount, - ratingRfCritics = ratingRfCritics, - ratingRfCriticsVoteCount = ratingRfCriticsVoteCount, - webUrl = webUrl.orEmpty(), - year = year, - filmLength = filmLength, - slogan = slogan.orEmpty(), - description = description, - shortDescription = shortDescription.orEmpty(), - editorAnnotation = editorAnnotation.orEmpty(), - isTicketsAvailable = isTicketsAvailable ?: false, - productionStatus = FilmProductionStatusNetwork.getType(productionStatus.orEmpty()), - type = type, - ratingMpaa = ratingMpaa, - ratingAgeLimits = ratingAgeLimits, - hasImax = hasImax ?: false, - has3D = has3D ?: false, - lastSync = lastSync, - countries = countries?.map { it.country }.orEmpty(), - genres = genres?.map { it.genre }.orEmpty(), - startYear = startYear, - endYear = endYear, - isSerial = serial ?: false, - isShortFilm = shortFilm ?: false, - isCompleted = completed ?: false -) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt deleted file mode 100644 index aa9fa8ec..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.stslex.core.network.api.kinopoisk.model.network - -import com.stslex.core.network.clients.film.model.TrailerSiteType - -data class TrailerItemKinopoisk( - val url: String, - val name: String, - val site: TrailerSiteType -) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt deleted file mode 100644 index 6c8a1c47..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.stslex.core.network.api.kinopoisk.source - -import com.stslex.core.network.api.kinopoisk.model.network.FilmListKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.MovieKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerKinopoisk - -interface KinopoiskNetworkClient { - - suspend fun getFilms(page: Int): FilmListKinopoisk - - suspend fun getFilm(id: String): MovieKinopoisk - - suspend fun getFilmTrailers(id: String): TrailerKinopoisk -} diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClient.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClient.kt deleted file mode 100644 index 5130d573..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClient.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.stslex.core.network.api.server.client - -import com.stslex.core.network.api.base.NetworkClient - -interface ServerApiClient : NetworkClient diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmNetworkMapper.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmNetworkMapper.kt deleted file mode 100644 index 9a92b5e6..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmNetworkMapper.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.stslex.core.network.clients.film.model - -import com.stslex.core.network.api.kinopoisk.model.network.FilmItemKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.FilmListKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.MovieKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerItemKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerKinopoisk - -fun FilmListKinopoisk.toNetwork() = FilmListNetwork( - results = items.map { it.toNetwork() }, - hasNext = total > totalPages -) - -fun FilmItemKinopoisk.toNetwork() = FilmItemNetwork( - id = kinopoiskId.toString(), - title = nameRu, - poster = posterUrlPreview, - rating = (ratingImdb?.toString() ?: ratingKinopoisk?.toString()).orEmpty(), - genres = genres, - countries = countries, - year = year?.toString().orEmpty(), - type = type.value.lowercase(), -) - -fun TrailerKinopoisk.toNetwork(): List = this.items.map { it.toNetwork() } - -fun TrailerItemKinopoisk.toNetwork() = FilmTrailerNetwork( - url = url, - name = name, - site = site, -) - -fun MovieKinopoisk.toNetwork() = MovieNetwork( - id = kinopoiskId.toString(), - title = nameRu, - description = description.orEmpty(), - poster = posterUrl, - rating = (ratingImdb?.toString() ?: ratingKinopoisk?.toString()).orEmpty(), - duration = filmLength?.toString().orEmpty(), - genres = genres, - countries = countries, - year = year?.toString().orEmpty(), - age = ratingAgeLimits.orEmpty(), - type = type.orEmpty().lowercase(), -) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClient.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClient.kt deleted file mode 100644 index 38e67286..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClient.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.stslex.core.network.clients.match.client - -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.clients.match.model.request.MatchCreateRequest -import com.stslex.core.network.clients.match.model.response.MatchDetailResponse -import com.stslex.core.network.clients.match.model.response.MatchResponse -import com.stslex.core.network.model.PagingRequest - -interface MatchClient { - - suspend fun getMatches(request: PagingRequest): PagingResponse - - suspend fun getMatch(matchUuid: String): MatchDetailResponse - - suspend fun createMatch(request: MatchCreateRequest): MatchDetailResponse -} diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/di/NetworkModule.kt b/core/network/src/commonMain/kotlin/com/stslex/core/network/di/NetworkModule.kt deleted file mode 100644 index 37d7f8db..00000000 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/di/NetworkModule.kt +++ /dev/null @@ -1,82 +0,0 @@ -package com.stslex.core.network.di - -import com.stslex.core.network.api.kinopoisk.api.KinopoiskApiClient -import com.stslex.core.network.api.kinopoisk.api.KinopoiskApiClientImpl -import com.stslex.core.network.api.kinopoisk.source.KinopoiskNetworkClient -import com.stslex.core.network.api.kinopoisk.source.KinopoiskNetworkClientImpl -import com.stslex.core.network.api.server.client.ServerApiClient -import com.stslex.core.network.api.server.client.ServerApiClientImpl -import com.stslex.core.network.api.server.error_handler.ErrorHandler -import com.stslex.core.network.api.server.error_handler.ErrorHandlerImpl -import com.stslex.core.network.api.server.http_client.ServerHttpClient -import com.stslex.core.network.api.server.http_client.ServerHttpClientImpl -import com.stslex.core.network.clients.auth.client.AuthClient -import com.stslex.core.network.clients.auth.client.AuthClientImpl -import com.stslex.core.network.clients.film.client.FilmClient -import com.stslex.core.network.clients.film.client.MockFilmClientImpl -import com.stslex.core.network.clients.match.client.MatchClient -import com.stslex.core.network.clients.match.client.MockMatchClientImpl -import com.stslex.core.network.clients.profile.client.ProfileClient -import com.stslex.core.network.clients.profile.client.ProfileClientImpl -import com.stslex.core.network.utils.token.AuthController -import com.stslex.core.network.utils.token.AuthControllerImpl -import org.koin.dsl.module - -val coreNetworkModule = module { - /*Clients*/ - single { - ErrorHandlerImpl( - client = lazy { get() }, - tokenProvider = get() - ) - } - - single { - ServerHttpClientImpl( - errorHandler = get(), - tokenProvider = get() - ) - } - - /*Kinopoisk Api*/ - single { KinopoiskApiClientImpl(appDispatcher = get()) } - single { KinopoiskNetworkClientImpl(apiClient = get()) } - - /*Server Api*/ - single { - ServerApiClientImpl( - appDispatcher = get(), - client = get() - ) - } - - /*Clients*/ - single { - AuthClientImpl( - networkClient = get(), - tokenController = get() - ) - } - single { - // todo remove mock - MockFilmClientImpl() -// FilmClientImpl( -// client = get(), -// kinopoiskClient = get() -// ) - } - single { - ProfileClientImpl(client = get()) - } - single { - // todo remove mock - MockMatchClientImpl() - } - - /*Utils*/ - single { - AuthControllerImpl( - userStore = get(), - ) - } -} \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/BaseNetworkClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/BaseNetworkClient.kt similarity index 61% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/BaseNetworkClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/BaseNetworkClient.kt index b3fc06d7..0495f1a7 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/BaseNetworkClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/BaseNetworkClient.kt @@ -1,10 +1,10 @@ -package com.stslex.core.network.api.base +package com.stslex.wizard.core.network.api.base -import com.stslex.core.core.AppDispatcher -import com.stslex.core.network.api.base.NetworkClientBuilder.setupDefaultRequest -import com.stslex.core.network.api.base.NetworkClientBuilder.setupLogging -import com.stslex.core.network.api.base.NetworkClientBuilder.setupNegotiation -import com.stslex.core.network.api.base.model.DefaultRequest +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.network.api.base.NetworkClientBuilder.setupDefaultRequest +import com.stslex.wizard.core.network.api.base.NetworkClientBuilder.setupLogging +import com.stslex.wizard.core.network.api.base.NetworkClientBuilder.setupNegotiation +import com.stslex.wizard.core.network.api.base.model.DefaultRequest import io.ktor.client.HttpClient import io.ktor.client.engine.cio.CIO import io.ktor.client.plugins.cache.HttpCache diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClient.kt similarity index 74% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClient.kt index 7577fd58..be31229e 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClient.kt @@ -1,10 +1,10 @@ -package com.stslex.core.network.api.base +package com.stslex.wizard.core.network.api.base -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE_SIZE -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_QUERY -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_UUID -import com.stslex.core.network.model.PagingRequest +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE_SIZE +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_QUERY +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_UUID +import com.stslex.wizard.core.network.model.PagingRequest import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.request.HttpRequestBuilder diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClientBuilder.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClientBuilder.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClientBuilder.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClientBuilder.kt index 3a6d5504..d0fb07d4 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/NetworkClientBuilder.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/NetworkClientBuilder.kt @@ -1,7 +1,7 @@ -package com.stslex.core.network.api.base +package com.stslex.wizard.core.network.api.base -import com.stslex.core.network.api.base.model.DefaultRequest -import com.stslex.core.network.utils.KtorLogger +import com.stslex.wizard.core.network.api.base.model.DefaultRequest +import com.stslex.wizard.core.network.utils.KtorLogger import io.ktor.client.HttpClientConfig import io.ktor.client.engine.cio.CIOEngineConfig import io.ktor.client.plugins.contentnegotiation.ContentNegotiation @@ -11,12 +11,10 @@ import io.ktor.client.plugins.logging.Logging import io.ktor.client.request.headers import io.ktor.http.URLProtocol import io.ktor.serialization.kotlinx.json.json -import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json internal object NetworkClientBuilder { - @OptIn(ExperimentalSerializationApi::class) fun HttpClientConfig.setupNegotiation() { install(ContentNegotiation) { json( diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/model/DefaultRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/model/DefaultRequest.kt similarity index 81% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/model/DefaultRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/model/DefaultRequest.kt index 860e05fc..311836e1 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/base/model/DefaultRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/base/model/DefaultRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.base.model +package com.stslex.wizard.core.network.api.base.model data class DefaultRequest( val hostUrl: String, diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClient.kt new file mode 100644 index 00000000..aa3b3cce --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClient.kt @@ -0,0 +1,5 @@ +package com.stslex.wizard.core.network.api.kinopoisk.api + +import com.stslex.wizard.core.network.api.base.NetworkClient + +interface KinopoiskApiClient : NetworkClient diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt similarity index 77% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt index 376f45c3..fa1754a8 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/api/KinopoiskApiClientImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.core.network.api.kinopoisk.api +package com.stslex.wizard.core.network.api.kinopoisk.api import Wizard.core.network.BuildConfig -import com.stslex.core.core.AppDispatcher -import com.stslex.core.network.api.base.BaseNetworkClient -import com.stslex.core.network.api.base.model.DefaultRequest +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.network.api.base.BaseNetworkClient +import com.stslex.wizard.core.network.api.base.model.DefaultRequest class KinopoiskApiClientImpl( appDispatcher: AppDispatcher diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt new file mode 100644 index 00000000..bf3c1b87 --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/NetworkApiKinopoiskMapper.kt @@ -0,0 +1,99 @@ +package com.stslex.wizard.core.network.api.kinopoisk.model + +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmItemKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmListKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmProductionStatusNetwork +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmTypeNetwork +import com.stslex.wizard.core.network.api.kinopoisk.model.network.MovieKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerItemKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.response.FilmItemResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.FilmListResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.MovieResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.TrailerItemResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.TrailerResponse +import com.stslex.wizard.core.network.clients.film.model.TrailerSiteType + +fun FilmListResponse.toNetwork(): FilmListKinopoisk = + FilmListKinopoisk( + total = total ?: 0, + totalPages = totalPages ?: 0, + items = items?.map { it.toNetwork() }.orEmpty() + ) + +fun FilmItemResponse.toNetwork(): FilmItemKinopoisk = FilmItemKinopoisk( + kinopoiskId = kinopoiskId, + imdbId = imdbId.orEmpty(), + nameRu = nameRu.orEmpty(), + nameEn = nameEn.orEmpty(), + nameOriginal = nameOriginal.orEmpty(), + countries = countries?.map { it.country }.orEmpty(), + genres = genres?.map { it.genre }.orEmpty(), + ratingKinopoisk = ratingKinopoisk, + ratingImdb = ratingImdb, + year = year, + posterUrl = posterUrl.orEmpty(), + posterUrlPreview = posterUrlPreview.orEmpty(), + type = FilmTypeNetwork.getType(type.orEmpty()) +) + +fun TrailerResponse.toNetwork(): TrailerKinopoisk = + TrailerKinopoisk( + total = total ?: 0, + items = items?.map { it.toNetwork() }.orEmpty() + ) + +fun TrailerItemResponse.toNetwork(): TrailerItemKinopoisk = TrailerItemKinopoisk( + url = url.orEmpty(), + name = name.orEmpty(), + site = TrailerSiteType.getByValue(site.orEmpty()), +) + +fun MovieResponse.toNetwork(): MovieKinopoisk = + MovieKinopoisk( + kinopoiskId = kinopoiskId, + kinopoiskHDId = kinopoiskHDId.orEmpty(), + imdbId = imdbId.orEmpty(), + nameRu = nameRu.orEmpty(), + nameEn = nameEn.orEmpty(), + nameOriginal = nameOriginal.orEmpty(), + posterUrl = posterUrl.orEmpty(), + posterUrlPreview = posterUrlPreview.orEmpty(), + coverUrl = coverUrl.orEmpty(), + logoUrl = logoUrl.orEmpty(), + reviewsCount = reviewsCount, + ratingGoodReview = ratingGoodReview, + ratingGoodReviewVoteCount = ratingGoodReviewVoteCount, + ratingKinopoisk = ratingKinopoisk, + ratingKinopoiskVoteCount = ratingKinopoiskVoteCount, + ratingImdb = ratingImdb, + ratingImdbVoteCount = ratingImdbVoteCount, + ratingFilmCritics = ratingFilmCritics, + ratingFilmCriticsVoteCount = ratingFilmCriticsVoteCount, + ratingAwait = ratingAwait, + ratingAwaitCount = ratingAwaitCount, + ratingRfCritics = ratingRfCritics, + ratingRfCriticsVoteCount = ratingRfCriticsVoteCount, + webUrl = webUrl.orEmpty(), + year = year, + filmLength = filmLength, + slogan = slogan.orEmpty(), + description = description, + shortDescription = shortDescription.orEmpty(), + editorAnnotation = editorAnnotation.orEmpty(), + isTicketsAvailable = isTicketsAvailable ?: false, + productionStatus = FilmProductionStatusNetwork.getType(productionStatus.orEmpty()), + type = type, + ratingMpaa = ratingMpaa, + ratingAgeLimits = ratingAgeLimits, + hasImax = hasImax ?: false, + has3D = has3D ?: false, + lastSync = lastSync, + countries = countries?.map { it.country }.orEmpty(), + genres = genres?.map { it.genre }.orEmpty(), + startYear = startYear, + endYear = endYear, + isSerial = serial ?: false, + isShortFilm = shortFilm ?: false, + isCompleted = completed ?: false + ) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt index 2317544f..85f4a13e 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmItemKinopoisk.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network data class FilmItemKinopoisk( val kinopoiskId: Int, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt similarity index 63% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt index 509cccce..3763be4a 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmListKinopoisk.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network data class FilmListKinopoisk( val total: Int, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt similarity index 86% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt index 34886cef..18cc69b6 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmProductionStatusNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network enum class FilmProductionStatusNetwork(val value: String) { FILMING("FILMING"), diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt index c468ba0a..eb17718b 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/FilmTypeNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network enum class FilmTypeNetwork(val value: String) { FILM("FILM"), diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt similarity index 95% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt index d09e3304..7948ea49 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/MovieKinopoisk.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network data class MovieKinopoisk( val kinopoiskId: Int, diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt new file mode 100644 index 00000000..1974a93f --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerItemKinopoisk.kt @@ -0,0 +1,9 @@ +package com.stslex.wizard.core.network.api.kinopoisk.model.network + +import com.stslex.wizard.core.network.clients.film.model.TrailerSiteType + +data class TrailerItemKinopoisk( + val url: String, + val name: String, + val site: TrailerSiteType +) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt similarity index 58% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt index a25fc80a..d53b6b1b 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/network/TrailerKinopoisk.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.network +package com.stslex.wizard.core.network.api.kinopoisk.model.network data class TrailerKinopoisk( val total: Int, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/request/FilmsRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/request/FilmsRequest.kt similarity index 71% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/request/FilmsRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/request/FilmsRequest.kt index 8273ab13..0dfb5eb6 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/request/FilmsRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/request/FilmsRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.request +package com.stslex.wizard.core.network.api.kinopoisk.model.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/CountryResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/CountryResponse.kt similarity index 72% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/CountryResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/CountryResponse.kt index 86fec40a..c7ded704 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/CountryResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/CountryResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmItemResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmItemResponse.kt similarity index 92% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmItemResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmItemResponse.kt index 50d22b7d..01918ac0 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmItemResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmItemResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmListResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmListResponse.kt similarity index 81% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmListResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmListResponse.kt index ad0ebb36..1f90a3be 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/FilmListResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/FilmListResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/GenreResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/GenreResponse.kt similarity index 71% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/GenreResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/GenreResponse.kt index c71867d6..7454aeac 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/GenreResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/GenreResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/MovieResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/MovieResponse.kt similarity index 97% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/MovieResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/MovieResponse.kt index 9198dc6e..f5989516 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/MovieResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/MovieResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt similarity index 79% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt index 3f174890..8d10cfbf 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerItemResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerResponse.kt similarity index 78% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerResponse.kt index 3fcbab67..750182e1 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/model/response/TrailerResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/model/response/TrailerResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.kinopoisk.model.response +package com.stslex.wizard.core.network.api.kinopoisk.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt new file mode 100644 index 00000000..45bc6c59 --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClient.kt @@ -0,0 +1,14 @@ +package com.stslex.wizard.core.network.api.kinopoisk.source + +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmListKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.MovieKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerKinopoisk + +interface KinopoiskNetworkClient { + + suspend fun getFilms(page: Int): FilmListKinopoisk + + suspend fun getFilm(id: String): MovieKinopoisk + + suspend fun getFilmTrailers(id: String): TrailerKinopoisk +} diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt similarity index 60% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt index 410136c3..13c0de16 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/kinopoisk/source/KinopoiskNetworkClientImpl.kt @@ -1,13 +1,13 @@ -package com.stslex.core.network.api.kinopoisk.source +package com.stslex.wizard.core.network.api.kinopoisk.source -import com.stslex.core.network.api.kinopoisk.api.KinopoiskApiClient -import com.stslex.core.network.api.kinopoisk.model.network.FilmListKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.MovieKinopoisk -import com.stslex.core.network.api.kinopoisk.model.network.TrailerKinopoisk -import com.stslex.core.network.api.kinopoisk.model.response.FilmListResponse -import com.stslex.core.network.api.kinopoisk.model.response.MovieResponse -import com.stslex.core.network.api.kinopoisk.model.response.TrailerResponse -import com.stslex.core.network.api.kinopoisk.model.toNetwork +import com.stslex.wizard.core.network.api.kinopoisk.api.KinopoiskApiClient +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmListKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.MovieKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.response.FilmListResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.MovieResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.response.TrailerResponse +import com.stslex.wizard.core.network.api.kinopoisk.model.toNetwork import io.ktor.client.call.body import io.ktor.client.request.get import io.ktor.client.request.parameter diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClient.kt new file mode 100644 index 00000000..d112253a --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClient.kt @@ -0,0 +1,5 @@ +package com.stslex.wizard.core.network.api.server.client + +import com.stslex.wizard.core.network.api.base.NetworkClient + +interface ServerApiClient : NetworkClient diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClientImpl.kt similarity index 65% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClientImpl.kt index 11f65a40..b24a6332 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/client/ServerApiClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/client/ServerApiClientImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.core.network.api.server.client +package com.stslex.wizard.core.network.api.server.client -import com.stslex.core.core.AppDispatcher -import com.stslex.core.network.api.server.http_client.ServerHttpClient -import com.stslex.core.network.api.server.model.ErrorRepeatEnd +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.network.api.server.http_client.ServerHttpClient +import com.stslex.wizard.core.network.api.server.model.ErrorRepeatEnd import io.ktor.client.HttpClient import kotlinx.coroutines.withContext diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandler.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandler.kt similarity index 63% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandler.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandler.kt index 17a76614..78cbe190 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandler.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandler.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.server.error_handler +package com.stslex.wizard.core.network.api.server.error_handler import io.ktor.client.plugins.CallRequestExceptionHandler diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandlerImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandlerImpl.kt similarity index 74% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandlerImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandlerImpl.kt index 0a62ac63..863542ed 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/ErrorHandlerImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/ErrorHandlerImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.core.network.api.server.error_handler +package com.stslex.wizard.core.network.api.server.error_handler -import com.stslex.core.network.api.server.error_handler.RefreshTokenValidator.setupResponseValidator -import com.stslex.core.network.api.server.http_client.ServerHttpClient -import com.stslex.core.network.api.server.model.ErrorRepeatEnd -import com.stslex.core.network.api.server.model.TokenResponseModel -import com.stslex.core.network.utils.token.AuthController -import com.stslex.core.network.utils.token.toModel +import com.stslex.wizard.core.network.api.server.error_handler.RefreshTokenValidator.setupResponseValidator +import com.stslex.wizard.core.network.api.server.http_client.ServerHttpClient +import com.stslex.wizard.core.network.api.server.model.ErrorRepeatEnd +import com.stslex.wizard.core.network.api.server.model.TokenResponseModel +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.core.network.utils.token.toModel import io.ktor.client.call.body import io.ktor.client.plugins.ResponseException import io.ktor.client.request.HttpRequest diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/RefreshTokenValidator.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/RefreshTokenValidator.kt similarity index 86% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/RefreshTokenValidator.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/RefreshTokenValidator.kt index 7592acf5..9d89e321 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/error_handler/RefreshTokenValidator.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/error_handler/RefreshTokenValidator.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.api.server.error_handler +package com.stslex.wizard.core.network.api.server.error_handler -import com.stslex.core.network.api.server.model.ErrorRefresh +import com.stslex.wizard.core.network.api.server.model.ErrorRefresh import io.ktor.client.HttpClient import io.ktor.client.plugins.CallRequestExceptionHandler import io.ktor.client.plugins.HttpResponseValidator diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClient.kt similarity index 66% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClient.kt index 5e859071..4b45ed61 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClient.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.server.http_client +package com.stslex.wizard.core.network.api.server.http_client import io.ktor.client.HttpClient diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClientImpl.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClientImpl.kt index b26c3a5e..d43541d6 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/http_client/ServerHttpClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/http_client/ServerHttpClientImpl.kt @@ -1,10 +1,10 @@ -package com.stslex.core.network.api.server.http_client +package com.stslex.wizard.core.network.api.server.http_client import Wizard.core.network.BuildConfig -import com.stslex.core.network.api.base.NetworkClientBuilder.setupLogging -import com.stslex.core.network.api.base.NetworkClientBuilder.setupNegotiation -import com.stslex.core.network.api.server.error_handler.ErrorHandler -import com.stslex.core.network.utils.token.AuthController +import com.stslex.wizard.core.network.api.base.NetworkClientBuilder.setupLogging +import com.stslex.wizard.core.network.api.base.NetworkClientBuilder.setupNegotiation +import com.stslex.wizard.core.network.api.server.error_handler.ErrorHandler +import com.stslex.wizard.core.network.utils.token.AuthController import io.ktor.client.HttpClient import io.ktor.client.engine.cio.CIO import io.ktor.client.plugins.HttpResponseValidator diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRefresh.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRefresh.kt similarity index 77% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRefresh.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRefresh.kt index 41dc73f2..d680b4f8 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRefresh.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRefresh.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.server.model +package com.stslex.wizard.core.network.api.server.model /** * Error refresh token response diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRepeatEnd.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRepeatEnd.kt similarity index 76% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRepeatEnd.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRepeatEnd.kt index 8b620246..cf71d71b 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/ErrorRepeatEnd.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/ErrorRepeatEnd.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.server.model +package com.stslex.wizard.core.network.api.server.model /** * Error repeat request. diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/TokenResponseModel.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/TokenResponseModel.kt similarity index 86% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/TokenResponseModel.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/TokenResponseModel.kt index e9f47de8..b902c12c 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/api/server/model/TokenResponseModel.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/api/server/model/TokenResponseModel.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.api.server.model +package com.stslex.wizard.core.network.api.server.model import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClient.kt similarity index 59% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClient.kt index c64e446c..66128bca 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClient.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.clients.auth.client +package com.stslex.wizard.core.network.clients.auth.client -import com.stslex.core.network.clients.auth.response.LoginOkResponse +import com.stslex.wizard.core.network.clients.auth.response.LoginOkResponse interface AuthClient { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClientImpl.kt similarity index 72% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClientImpl.kt index 4ac016c4..3ca95e2d 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/client/AuthClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/client/AuthClientImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.core.network.clients.auth.client +package com.stslex.wizard.core.network.clients.auth.client -import com.stslex.core.network.api.server.client.ServerApiClient -import com.stslex.core.network.clients.auth.request.LoginRequest -import com.stslex.core.network.clients.auth.request.RegisterRequest -import com.stslex.core.network.clients.auth.response.LoginOkResponse -import com.stslex.core.network.utils.token.AuthController -import com.stslex.core.network.utils.token.toModel +import com.stslex.wizard.core.network.api.server.client.ServerApiClient +import com.stslex.wizard.core.network.clients.auth.request.LoginRequest +import com.stslex.wizard.core.network.clients.auth.request.RegisterRequest +import com.stslex.wizard.core.network.clients.auth.response.LoginOkResponse +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.core.network.utils.token.toModel import io.ktor.client.call.body import io.ktor.client.request.post import io.ktor.client.request.setBody diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/LoginRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/LoginRequest.kt similarity index 78% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/LoginRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/LoginRequest.kt index 17353abc..ec74a094 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/LoginRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/LoginRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.auth.request +package com.stslex.wizard.core.network.clients.auth.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/RegisterRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/RegisterRequest.kt similarity index 82% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/RegisterRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/RegisterRequest.kt index cb729dab..7fd9c779 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/request/RegisterRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/request/RegisterRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.auth.request +package com.stslex.wizard.core.network.clients.auth.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/response/LoginOkResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/response/LoginOkResponse.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/response/LoginOkResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/response/LoginOkResponse.kt index c6e5a9f6..5760e92d 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/auth/response/LoginOkResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/auth/response/LoginOkResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.auth.response +package com.stslex.wizard.core.network.clients.auth.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClient.kt similarity index 51% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClient.kt index 9e80f0a4..31010678 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClient.kt @@ -1,8 +1,8 @@ -package com.stslex.core.network.clients.film.client +package com.stslex.wizard.core.network.clients.film.client -import com.stslex.core.network.clients.film.model.FilmListNetwork -import com.stslex.core.network.clients.film.model.FilmTrailerNetwork -import com.stslex.core.network.clients.film.model.MovieNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmListNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmTrailerNetwork +import com.stslex.wizard.core.network.clients.film.model.MovieNetwork interface FilmClient { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClientImpl.kt similarity index 60% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClientImpl.kt index c5e5cffa..0f571382 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/FilmClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/FilmClientImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.core.network.clients.film.client +package com.stslex.wizard.core.network.clients.film.client -import com.stslex.core.network.api.base.NetworkClient -import com.stslex.core.network.api.kinopoisk.source.KinopoiskNetworkClient -import com.stslex.core.network.clients.film.model.FilmListNetwork -import com.stslex.core.network.clients.film.model.FilmTrailerNetwork -import com.stslex.core.network.clients.film.model.MovieNetwork -import com.stslex.core.network.clients.film.model.toNetwork +import com.stslex.wizard.core.network.api.base.NetworkClient +import com.stslex.wizard.core.network.api.kinopoisk.source.KinopoiskNetworkClient +import com.stslex.wizard.core.network.clients.film.model.FilmListNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmTrailerNetwork +import com.stslex.wizard.core.network.clients.film.model.MovieNetwork +import com.stslex.wizard.core.network.clients.film.model.toNetwork class FilmClientImpl( private val client: NetworkClient, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/MockFilmClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/MockFilmClientImpl.kt similarity index 93% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/MockFilmClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/MockFilmClientImpl.kt index b8fa7736..0a736c91 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/client/MockFilmClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/client/MockFilmClientImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.core.network.clients.film.client - -import com.stslex.core.core.Logger -import com.stslex.core.core.randomUuid -import com.stslex.core.network.clients.film.model.FilmItemNetwork -import com.stslex.core.network.clients.film.model.FilmListNetwork -import com.stslex.core.network.clients.film.model.FilmTrailerNetwork -import com.stslex.core.network.clients.film.model.MovieNetwork +package com.stslex.wizard.core.network.clients.film.client + +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.core.randomUuid +import com.stslex.wizard.core.network.clients.film.model.FilmItemNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmListNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmTrailerNetwork +import com.stslex.wizard.core.network.clients.film.model.MovieNetwork import kotlinx.coroutines.delay import kotlin.coroutines.coroutineContext import kotlin.random.Random diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmItemNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmItemNetwork.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmItemNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmItemNetwork.kt index 50808633..9f7598b8 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmItemNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmItemNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.film.model +package com.stslex.wizard.core.network.clients.film.model data class FilmItemNetwork( val id: String, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmListNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmListNetwork.kt similarity index 62% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmListNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmListNetwork.kt index 7b90a69b..7d6a287f 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmListNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmListNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.film.model +package com.stslex.wizard.core.network.clients.film.model data class FilmListNetwork( val results: List, diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmNetworkMapper.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmNetworkMapper.kt new file mode 100644 index 00000000..5d780794 --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmNetworkMapper.kt @@ -0,0 +1,47 @@ +package com.stslex.wizard.core.network.clients.film.model + +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmItemKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.FilmListKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.MovieKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerItemKinopoisk +import com.stslex.wizard.core.network.api.kinopoisk.model.network.TrailerKinopoisk + +fun FilmListKinopoisk.toNetwork() = FilmListNetwork( + results = items.map { it.toNetwork() }, + hasNext = total > totalPages +) + +fun FilmItemKinopoisk.toNetwork() = FilmItemNetwork( + id = kinopoiskId.toString(), + title = nameRu, + poster = posterUrlPreview, + rating = (ratingImdb?.toString() ?: ratingKinopoisk?.toString()).orEmpty(), + genres = genres, + countries = countries, + year = year?.toString().orEmpty(), + type = type.value.lowercase(), +) + +fun TrailerKinopoisk.toNetwork(): List = this.items.map { it.toNetwork() } + +fun TrailerItemKinopoisk.toNetwork() = + com.stslex.wizard.core.network.clients.film.model.FilmTrailerNetwork( + url = url, + name = name, + site = site, + ) + +fun MovieKinopoisk.toNetwork() = + MovieNetwork( + id = kinopoiskId.toString(), + title = nameRu, + description = description.orEmpty(), + poster = posterUrl, + rating = (ratingImdb?.toString() ?: ratingKinopoisk?.toString()).orEmpty(), + duration = filmLength?.toString().orEmpty(), + genres = genres, + countries = countries, + year = year?.toString().orEmpty(), + age = ratingAgeLimits.orEmpty(), + type = type.orEmpty().lowercase(), + ) \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmTrailerNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmTrailerNetwork.kt similarity index 65% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmTrailerNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmTrailerNetwork.kt index b15dccd5..e0c4e396 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/FilmTrailerNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/FilmTrailerNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.film.model +package com.stslex.wizard.core.network.clients.film.model data class FilmTrailerNetwork( val url: String, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/MovieNetwork.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/MovieNetwork.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/MovieNetwork.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/MovieNetwork.kt index c944707c..056cdc7a 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/MovieNetwork.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/MovieNetwork.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.film.model +package com.stslex.wizard.core.network.clients.film.model data class MovieNetwork( val id: String, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/TrailerSiteType.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/TrailerSiteType.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/TrailerSiteType.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/TrailerSiteType.kt index e4943941..2b44d35d 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/film/model/TrailerSiteType.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/film/model/TrailerSiteType.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.film.model +package com.stslex.wizard.core.network.clients.film.model enum class TrailerSiteType(val value: String) { YOUTUBE("YOUTUBE"), diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClient.kt new file mode 100644 index 00000000..3e4adda5 --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClient.kt @@ -0,0 +1,16 @@ +package com.stslex.wizard.core.network.clients.match.client + +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.clients.match.model.request.MatchCreateRequest +import com.stslex.wizard.core.network.clients.match.model.response.MatchDetailResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchResponse +import com.stslex.wizard.core.network.model.PagingRequest + +interface MatchClient { + + suspend fun getMatches(request: PagingRequest): PagingResponse + + suspend fun getMatch(matchUuid: String): MatchDetailResponse + + suspend fun createMatch(request: MatchCreateRequest): MatchDetailResponse +} diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClientImpl.kt similarity index 54% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClientImpl.kt index cd24a890..ba8d22cd 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MatchClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MatchClientImpl.kt @@ -1,14 +1,14 @@ -package com.stslex.core.network.clients.match.client +package com.stslex.wizard.core.network.clients.match.client -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.api.base.get -import com.stslex.core.network.api.base.post -import com.stslex.core.network.api.base.requestPaging -import com.stslex.core.network.api.server.client.ServerApiClient -import com.stslex.core.network.clients.match.model.request.MatchCreateRequest -import com.stslex.core.network.clients.match.model.response.MatchDetailResponse -import com.stslex.core.network.clients.match.model.response.MatchResponse -import com.stslex.core.network.model.PagingRequest +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.api.base.get +import com.stslex.wizard.core.network.api.base.post +import com.stslex.wizard.core.network.api.base.requestPaging +import com.stslex.wizard.core.network.api.server.client.ServerApiClient +import com.stslex.wizard.core.network.clients.match.model.request.MatchCreateRequest +import com.stslex.wizard.core.network.clients.match.model.response.MatchDetailResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchResponse +import com.stslex.wizard.core.network.model.PagingRequest import io.ktor.client.request.parameter import io.ktor.client.request.setBody diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MockMatchClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MockMatchClientImpl.kt similarity index 79% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MockMatchClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MockMatchClientImpl.kt index 64460b22..f6bc4d2a 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/client/MockMatchClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/client/MockMatchClientImpl.kt @@ -1,13 +1,13 @@ -package com.stslex.core.network.clients.match.client +package com.stslex.wizard.core.network.clients.match.client -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.clients.match.model.request.MatchCreateRequest -import com.stslex.core.network.clients.match.model.response.MatchDetailResponse -import com.stslex.core.network.clients.match.model.response.MatchResponse -import com.stslex.core.network.clients.match.model.response.MatchStatusResponse -import com.stslex.core.network.clients.match.model.response.MatchUserResponse -import com.stslex.core.network.model.PagingRequest -import com.stslex.core.network.utils.currentTimeMs +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.clients.match.model.request.MatchCreateRequest +import com.stslex.wizard.core.network.clients.match.model.response.MatchDetailResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchStatusResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchUserResponse +import com.stslex.wizard.core.network.model.PagingRequest +import com.stslex.wizard.core.network.utils.currentTimeMs import kotlinx.coroutines.delay class MockMatchClientImpl : MatchClient { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/request/MatchCreateRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/request/MatchCreateRequest.kt similarity index 86% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/request/MatchCreateRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/request/MatchCreateRequest.kt index 1ccddc97..30e78d58 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/request/MatchCreateRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/request/MatchCreateRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.match.model.request +package com.stslex.wizard.core.network.clients.match.model.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchDetailResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchDetailResponse.kt similarity index 91% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchDetailResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchDetailResponse.kt index 3f8035ce..ac390046 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchDetailResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchDetailResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.match.model.response +package com.stslex.wizard.core.network.clients.match.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchResponse.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchResponse.kt index 65a91bdf..3feeaa8d 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchResponse.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.clients.match.model.response +package com.stslex.wizard.core.network.clients.match.model.response -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchStatusResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchStatusResponse.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchStatusResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchStatusResponse.kt index d5656052..656d91e1 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchStatusResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchStatusResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.match.model.response +package com.stslex.wizard.core.network.clients.match.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchUserResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchUserResponse.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchUserResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchUserResponse.kt index e35ac286..d3521e4f 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/match/model/response/MatchUserResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/match/model/response/MatchUserResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.match.model.response +package com.stslex.wizard.core.network.clients.match.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/MockProfileClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/MockProfileClientImpl.kt similarity index 85% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/MockProfileClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/MockProfileClientImpl.kt index 14dc2197..348bfc51 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/MockProfileClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/MockProfileClientImpl.kt @@ -1,13 +1,13 @@ -package com.stslex.core.network.clients.profile.client +package com.stslex.wizard.core.network.clients.profile.client -import com.stslex.core.core.Logger -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.clients.profile.model.request.PagingProfileRequest -import com.stslex.core.network.clients.profile.model.response.BooleanResponse -import com.stslex.core.network.clients.profile.model.response.UserFavouriteResultResponse -import com.stslex.core.network.clients.profile.model.response.UserFollowerResponse -import com.stslex.core.network.clients.profile.model.response.UserResponse -import com.stslex.core.network.clients.profile.model.response.UserSearchResponse +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.clients.profile.model.request.PagingProfileRequest +import com.stslex.wizard.core.network.clients.profile.model.response.BooleanResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFavouriteResultResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFollowerResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserSearchResponse import kotlinx.coroutines.delay class MockProfileClientImpl : ProfileClient { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClient.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClient.kt similarity index 52% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClient.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClient.kt index bc7a2dbe..20b07911 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClient.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClient.kt @@ -1,12 +1,12 @@ -package com.stslex.core.network.clients.profile.client - -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.clients.profile.model.request.PagingProfileRequest -import com.stslex.core.network.clients.profile.model.response.BooleanResponse -import com.stslex.core.network.clients.profile.model.response.UserFavouriteResultResponse -import com.stslex.core.network.clients.profile.model.response.UserFollowerResponse -import com.stslex.core.network.clients.profile.model.response.UserResponse -import com.stslex.core.network.clients.profile.model.response.UserSearchResponse +package com.stslex.wizard.core.network.clients.profile.client + +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.clients.profile.model.request.PagingProfileRequest +import com.stslex.wizard.core.network.clients.profile.model.response.BooleanResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFavouriteResultResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFollowerResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserSearchResponse interface ProfileClient { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClientImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClientImpl.kt similarity index 71% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClientImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClientImpl.kt index cce533ef..06475265 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/client/ProfileClientImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/client/ProfileClientImpl.kt @@ -1,18 +1,18 @@ -package com.stslex.core.network.clients.profile.client +package com.stslex.wizard.core.network.clients.profile.client -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE_SIZE -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_QUERY -import com.stslex.core.network.api.base.NetworkClient.Companion.PARAMETER_UUID -import com.stslex.core.network.api.server.client.ServerApiClient -import com.stslex.core.network.clients.profile.model.request.AddLikeRequest -import com.stslex.core.network.clients.profile.model.request.PagingProfileRequest -import com.stslex.core.network.clients.profile.model.response.BooleanResponse -import com.stslex.core.network.clients.profile.model.response.UserFavouriteResultResponse -import com.stslex.core.network.clients.profile.model.response.UserFollowerResponse -import com.stslex.core.network.clients.profile.model.response.UserResponse -import com.stslex.core.network.clients.profile.model.response.UserSearchResponse +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_PAGE_SIZE +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_QUERY +import com.stslex.wizard.core.network.api.base.NetworkClient.Companion.PARAMETER_UUID +import com.stslex.wizard.core.network.api.server.client.ServerApiClient +import com.stslex.wizard.core.network.clients.profile.model.request.AddLikeRequest +import com.stslex.wizard.core.network.clients.profile.model.request.PagingProfileRequest +import com.stslex.wizard.core.network.clients.profile.model.response.BooleanResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFavouriteResultResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFollowerResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserSearchResponse import io.ktor.client.call.body import io.ktor.client.request.HttpRequestBuilder import io.ktor.client.request.delete diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/AddLikeRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/AddLikeRequest.kt similarity index 77% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/AddLikeRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/AddLikeRequest.kt index b8169077..db863cbb 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/AddLikeRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/AddLikeRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.profile.model.request +package com.stslex.wizard.core.network.clients.profile.model.request import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/PagingProfileRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/PagingProfileRequest.kt similarity index 66% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/PagingProfileRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/PagingProfileRequest.kt index 64e1b58f..51d97dc5 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/request/PagingProfileRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/request/PagingProfileRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.profile.model.request +package com.stslex.wizard.core.network.clients.profile.model.request data class PagingProfileRequest( val query: String = "", diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/BooleanResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/BooleanResponse.kt similarity index 71% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/BooleanResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/BooleanResponse.kt index 8c87d123..843c322f 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/BooleanResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/BooleanResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.profile.model.response +package com.stslex.wizard.core.network.clients.profile.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt similarity index 71% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt index 4d41b747..8e415bb0 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFavouriteResultResponse.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.clients.profile.model.response +package com.stslex.wizard.core.network.clients.profile.model.response -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFollowerResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFollowerResponse.kt similarity index 74% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFollowerResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFollowerResponse.kt index 2fef443e..ef6c36a2 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserFollowerResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserFollowerResponse.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.clients.profile.model.response +package com.stslex.wizard.core.network.clients.profile.model.response -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserResponse.kt similarity index 91% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserResponse.kt index 7625a708..7840bb5f 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.profile.model.response +package com.stslex.wizard.core.network.clients.profile.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserSearchResponse.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserSearchResponse.kt similarity index 73% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserSearchResponse.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserSearchResponse.kt index bb4e57f6..b798d959 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/clients/profile/model/response/UserSearchResponse.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/clients/profile/model/response/UserSearchResponse.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.clients.profile.model.response +package com.stslex.wizard.core.network.clients.profile.model.response import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/di/NetworkModule.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/di/NetworkModule.kt new file mode 100644 index 00000000..33653488 --- /dev/null +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/di/NetworkModule.kt @@ -0,0 +1,82 @@ +package com.stslex.wizard.core.network.di + +import com.stslex.wizard.core.network.api.kinopoisk.api.KinopoiskApiClient +import com.stslex.wizard.core.network.api.kinopoisk.api.KinopoiskApiClientImpl +import com.stslex.wizard.core.network.api.kinopoisk.source.KinopoiskNetworkClient +import com.stslex.wizard.core.network.api.kinopoisk.source.KinopoiskNetworkClientImpl +import com.stslex.wizard.core.network.api.server.client.ServerApiClient +import com.stslex.wizard.core.network.api.server.client.ServerApiClientImpl +import com.stslex.wizard.core.network.api.server.error_handler.ErrorHandler +import com.stslex.wizard.core.network.api.server.error_handler.ErrorHandlerImpl +import com.stslex.wizard.core.network.api.server.http_client.ServerHttpClient +import com.stslex.wizard.core.network.api.server.http_client.ServerHttpClientImpl +import com.stslex.wizard.core.network.clients.auth.client.AuthClient +import com.stslex.wizard.core.network.clients.auth.client.AuthClientImpl +import com.stslex.wizard.core.network.clients.film.client.FilmClient +import com.stslex.wizard.core.network.clients.film.client.MockFilmClientImpl +import com.stslex.wizard.core.network.clients.match.client.MatchClient +import com.stslex.wizard.core.network.clients.match.client.MockMatchClientImpl +import com.stslex.wizard.core.network.clients.profile.client.ProfileClient +import com.stslex.wizard.core.network.clients.profile.client.ProfileClientImpl +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.core.network.utils.token.AuthControllerImpl +import org.koin.dsl.module + +val coreNetworkModule = module { + /*Clients*/ + single { + ErrorHandlerImpl( + client = lazy { get() }, + tokenProvider = get() + ) + } + + single { + ServerHttpClientImpl( + errorHandler = get(), + tokenProvider = get() + ) + } + + /*Kinopoisk Api*/ + single { KinopoiskApiClientImpl(appDispatcher = get()) } + single { KinopoiskNetworkClientImpl(apiClient = get()) } + + /*Server Api*/ + single { + ServerApiClientImpl( + appDispatcher = get(), + client = get() + ) + } + + /*Clients*/ + single { + AuthClientImpl( + networkClient = get(), + tokenController = get() + ) + } + single { + // todo remove mock + MockFilmClientImpl() +// FilmClientImpl( +// client = get(), +// kinopoiskClient = get() +// ) + } + single { + ProfileClientImpl(client = get()) + } + single { + // todo remove mock + MockMatchClientImpl() + } + + /*Utils*/ + single { + AuthControllerImpl( + userStore = get(), + ) + } +} \ No newline at end of file diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/model/PagingRequest.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/model/PagingRequest.kt similarity index 72% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/model/PagingRequest.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/model/PagingRequest.kt index 1a5cd24d..948d3f44 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/model/PagingRequest.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/model/PagingRequest.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.model +package com.stslex.wizard.core.network.model data class PagingRequest( val uuid: String, diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/AppKamelConfig.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/AppKamelConfig.kt similarity index 92% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/AppKamelConfig.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/AppKamelConfig.kt index 2c4032b2..58c84392 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/AppKamelConfig.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/AppKamelConfig.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.utils +package com.stslex.wizard.core.network.utils import io.kamel.core.config.KamelConfig import io.kamel.core.config.httpFetcher diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorExt.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorExt.kt similarity index 67% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorExt.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorExt.kt index 70061f18..54283902 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorExt.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorExt.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.utils +package com.stslex.wizard.core.network.utils import io.ktor.util.date.getTimeMillis diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorLogger.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorLogger.kt similarity index 67% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorLogger.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorLogger.kt index 65995ca6..0d0ac670 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/KtorLogger.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/KtorLogger.kt @@ -1,7 +1,7 @@ -package com.stslex.core.network.utils +package com.stslex.wizard.core.network.utils import io.ktor.client.plugins.logging.Logger -import com.stslex.core.core.Logger as Log +import com.stslex.wizard.core.core.Logger as Log object KtorLogger : Logger { diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthController.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthController.kt similarity index 83% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthController.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthController.kt index 61c2e27a..770166ec 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthController.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthController.kt @@ -1,4 +1,4 @@ -package com.stslex.core.network.utils.token +package com.stslex.wizard.core.network.utils.token import kotlinx.coroutines.flow.StateFlow diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthControllerImpl.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthControllerImpl.kt similarity index 91% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthControllerImpl.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthControllerImpl.kt index 95467c3d..75f46d4b 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/AuthControllerImpl.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/AuthControllerImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.core.network.utils.token +package com.stslex.wizard.core.network.utils.token -import com.stslex.core.database.store.UserStore +import com.stslex.wizard.core.database.store.UserStore import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow diff --git a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/TokenModel.kt b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/TokenModel.kt similarity index 68% rename from core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/TokenModel.kt rename to core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/TokenModel.kt index 44abe1c1..931bdbe9 100644 --- a/core/network/src/commonMain/kotlin/com/stslex/core/network/utils/token/TokenModel.kt +++ b/core/network/src/commonMain/kotlin/com/stslex/wizard/core/network/utils/token/TokenModel.kt @@ -1,7 +1,7 @@ -package com.stslex.core.network.utils.token +package com.stslex.wizard.core.network.utils.token -import com.stslex.core.network.api.server.model.TokenResponseModel -import com.stslex.core.network.clients.auth.response.LoginOkResponse +import com.stslex.wizard.core.network.api.server.model.TokenResponseModel +import com.stslex.wizard.core.network.clients.auth.response.LoginOkResponse data class TokenModel( val uuid: String, diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index d7ab0d4e..8c555a72 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -1,86 +1,20 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/CoreUiPodfile") - framework { - baseName = "coreUi" - } - } - sourceSets { - commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:network")) - - api(compose.runtime) - api(compose.foundation) - api(compose.material) - api(compose.material3) - api(compose.components.resources) api(libs.bundles.voyager) - api(libs.kamel) - - implementation("org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0-beta02") - } - commonTest.dependencies { - implementation(libs.kotlin.test) } androidMain.dependencies { - api(libs.compose.ui) - api(libs.compose.ui.tooling.preview) - api(libs.androidx.activity.compose) api(libs.coil.compose) } iosMain.dependencies { // TODO research TLS PROBLEM - implementation("io.ktor:ktor-client-darwin:2.3.2") - } - dependencies { - debugApi(libs.compose.ui.tooling) + implementation(libs.ktor.client.darwin) } } } - -android { - namespace = "com.stslex.core.ui" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} diff --git a/core/ui/src/androidMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.android.kt b/core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.android.kt similarity index 90% rename from core/ui/src/androidMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.android.kt rename to core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.android.kt index 39149044..fdb878ec 100644 --- a/core/ui/src/androidMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.android.kt +++ b/core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.android.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -6,7 +6,7 @@ import androidx.compose.ui.graphics.FilterQuality import androidx.compose.ui.layout.ContentScale import coil.compose.AsyncImage import coil.compose.AsyncImagePainter -import com.stslex.core.core.Logger +import com.stslex.wizard.core.core.Logger @Composable actual fun NativeNetworkImage( diff --git a/core/ui/src/androidMain/kotlin/com/stslex/core/ui/mvi/StoreExt.android.kt b/core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.android.kt similarity index 92% rename from core/ui/src/androidMain/kotlin/com/stslex/core/ui/mvi/StoreExt.android.kt rename to core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.android.kt index 3d17a969..798572cc 100644 --- a/core/ui/src/androidMain/kotlin/com/stslex/core/ui/mvi/StoreExt.android.kt +++ b/core/ui/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.android.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi import androidx.lifecycle.ViewModel import org.koin.androidx.viewmodel.dsl.viewModel diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingItem.kt b/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingItem.kt deleted file mode 100644 index ffcbeedb..00000000 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingItem.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.stslex.core.ui.base.paging - -import androidx.compose.runtime.Stable -import com.stslex.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGING_TYPE -import com.stslex.core.core.paging.PagingCoreItem - -@Stable -interface PagingItem : PagingCoreItem { - - override val uuid: String - - val contentType: String - get() = DEFAULT_PAGING_TYPE -} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/di/CoreUiModule.kt b/core/ui/src/commonMain/kotlin/com/stslex/core/ui/di/CoreUiModule.kt deleted file mode 100644 index ba87e4cd..00000000 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/di/CoreUiModule.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.stslex.core.ui.di - -import com.stslex.core.ui.pager.pager.StorePagerFactory -import com.stslex.core.ui.pager.pager.StorePagerFactoryImpl -import com.stslex.core.ui.pager.paging_worker.PagingWorkerFactory -import com.stslex.core.ui.pager.paging_worker.PagingWorkerFactoryImpl -import org.koin.dsl.module - -val coreUiModule = module { - factory { - PagingWorkerFactoryImpl() - } - factory { - StorePagerFactoryImpl( - workerFactory = get() - ) - } -} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/mapper/PagingMapper.kt b/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/mapper/PagingMapper.kt deleted file mode 100644 index 6c4a20cc..00000000 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/mapper/PagingMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.stslex.core.ui.pager.mapper - -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.ui.base.paging.PagingItem - -fun interface PagingMapper { - - suspend operator fun invoke(item: T): R -} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactory.kt b/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactory.kt deleted file mode 100644 index a698cebe..00000000 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactory.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.stslex.core.ui.pager.pager - -import com.stslex.core.core.coroutine.AppCoroutineScope -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingItem -import com.stslex.core.ui.pager.mapper.PagingMapper - -interface StorePagerFactory { - - fun create( - scope: AppCoroutineScope, - request: suspend (page: Int, pageSize: Int) -> PagingResponse, - mapper: PagingMapper, - config: PagingConfig - ): StorePager -} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Animations.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Animations.kt similarity index 96% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Animations.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Animations.kt index de8c97fa..d2012e88 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Animations.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Animations.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base +package com.stslex.wizard.core.ui.base import androidx.compose.animation.core.LinearEasing import androidx.compose.animation.core.RepeatMode @@ -25,7 +25,7 @@ import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Brush import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.stslex.core.ui.theme.toPx +import com.stslex.wizard.core.ui.theme.toPx import kotlin.math.roundToInt fun Modifier.shimmerLoadingAnimation( @@ -105,7 +105,7 @@ fun DotsPrintAnimation( animationSpec = infiniteRepeatable( animation = keyframes { durationMillis = delayUnit * dotsCount.inc() - 0f at delay with LinearEasing + 0f at delay using LinearEasing maxOffset at delay + (delayUnit * delayFraction).roundToInt() with LinearEasing 0f at delay + (delayUnit * 2 * delayFraction).roundToInt() } diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/AppError.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/AppError.kt similarity index 83% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/AppError.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/AppError.kt index aaedd4f8..96883231 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/AppError.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/AppError.kt @@ -1,7 +1,7 @@ -package com.stslex.core.ui.base +package com.stslex.wizard.core.ui.base import androidx.compose.runtime.Stable -import com.stslex.core.network.api.server.model.ErrorRefresh +import com.stslex.wizard.core.network.api.server.model.ErrorRefresh @Stable sealed class AppError(open val message: String) { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Clicker.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Clicker.kt similarity index 92% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Clicker.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Clicker.kt index 5295d3dc..03b50f2b 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/Clicker.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/Clicker.kt @@ -1,9 +1,9 @@ -package com.stslex.core.ui.base +package com.stslex.wizard.core.ui.base import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import com.stslex.core.network.utils.currentTimeMs +import com.stslex.wizard.core.network.utils.currentTimeMs import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeScrollConnection.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeScrollConnection.kt similarity index 97% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeScrollConnection.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeScrollConnection.kt index e34932f5..ff03b96f 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeScrollConnection.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeScrollConnection.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base +package com.stslex.wizard.core.ui.base import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.SwipeableState diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeState.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeState.kt similarity index 56% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeState.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeState.kt index 164af9c3..0448ad42 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/SwipeState.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/SwipeState.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base +package com.stslex.wizard.core.ui.base enum class SwipeState { COLLAPSE, diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/ImageType.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/ImageType.kt similarity index 52% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/ImageType.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/ImageType.kt index b45523f8..3c92754b 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/ImageType.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/ImageType.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image enum class ImageType { KAMEL, diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/KamelNetworkImage.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/KamelNetworkImage.kt similarity index 91% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/KamelNetworkImage.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/KamelNetworkImage.kt index 19e255bc..7caf3321 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/KamelNetworkImage.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/KamelNetworkImage.kt @@ -1,10 +1,10 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image import androidx.compose.foundation.layout.BoxScope import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale -import com.stslex.core.core.Logger +import com.stslex.wizard.core.core.Logger import io.kamel.image.KamelImage import io.kamel.image.asyncPainterResource diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.kt similarity index 86% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.kt index 87901fb4..64c8c4a8 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NetworkImage.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NetworkImage.kt similarity index 95% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NetworkImage.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NetworkImage.kt index 6b6e24db..a9eefaef 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/image/NetworkImage.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/image/NetworkImage.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image import androidx.compose.foundation.layout.BoxScope import androidx.compose.runtime.Composable diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingColumn.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingColumn.kt similarity index 88% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingColumn.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingColumn.kt index 523b62b5..235df2f1 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingColumn.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingColumn.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.paging +package com.stslex.wizard.core.ui.base.paging import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -10,10 +10,10 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier -import com.stslex.core.core.paging.PagingCoreData.Companion.DEFAULT_APPEND_TYPE -import com.stslex.core.core.paging.PagingCoreData.Companion.DEFAULT_BOTTOM_TYPE -import com.stslex.core.ui.base.DotsPrintAnimation -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.core.paging.PagingCoreData.Companion.DEFAULT_APPEND_TYPE +import com.stslex.wizard.core.core.paging.PagingCoreData.Companion.DEFAULT_BOTTOM_TYPE +import com.stslex.wizard.core.ui.base.DotsPrintAnimation +import com.stslex.wizard.core.ui.theme.AppDimension import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.filterNotNull diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingConfig.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingConfig.kt similarity index 87% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingConfig.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingConfig.kt index 18f49ff1..0e007474 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingConfig.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingConfig.kt @@ -1,7 +1,7 @@ -package com.stslex.core.ui.base.paging +package com.stslex.wizard.core.ui.base.paging import androidx.compose.runtime.Stable -import com.stslex.core.core.paging.PagingCoreData +import com.stslex.wizard.core.core.paging.PagingCoreData @Stable data class PagingConfig( diff --git a/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingItem.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingItem.kt new file mode 100644 index 00000000..95440cdf --- /dev/null +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingItem.kt @@ -0,0 +1,14 @@ +package com.stslex.wizard.core.ui.base.paging + +import androidx.compose.runtime.Stable +import com.stslex.wizard.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGING_TYPE +import com.stslex.wizard.core.core.paging.PagingCoreItem + +@Stable +interface PagingItem : PagingCoreItem { + + override val uuid: String + + val contentType: String + get() = DEFAULT_PAGING_TYPE +} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingState.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingState.kt similarity index 76% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingState.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingState.kt index edd9ee4b..5b929776 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingState.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingState.kt @@ -1,11 +1,11 @@ -package com.stslex.core.ui.base.paging +package com.stslex.wizard.core.ui.base.paging import androidx.compose.runtime.Stable -import com.stslex.core.core.asyncMap -import com.stslex.core.core.paging.PagingCoreData -import com.stslex.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGE -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.asyncMap +import com.stslex.wizard.core.core.paging.PagingCoreData +import com.stslex.wizard.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGE +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingUiState.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingUiState.kt similarity index 94% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingUiState.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingUiState.kt index 58847eb2..a9d671d4 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/paging/PagingUiState.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/paging/PagingUiState.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.paging +package com.stslex.wizard.core.ui.base.paging import androidx.compose.runtime.Stable import kotlinx.collections.immutable.ImmutableList diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/DimensionSubComposeLayout.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/DimensionSubComposeLayout.kt similarity index 96% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/DimensionSubComposeLayout.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/DimensionSubComposeLayout.kt index fdc3cbda..a7fbf4c5 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/DimensionSubComposeLayout.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/DimensionSubComposeLayout.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.subcompose +package com.stslex.wizard.core.ui.base.subcompose import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/SubComposeType.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/SubComposeType.kt similarity index 50% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/SubComposeType.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/SubComposeType.kt index 40754c8c..bff560d1 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/base/subcompose/SubComposeType.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/base/subcompose/SubComposeType.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.subcompose +package com.stslex.wizard.core.ui.base.subcompose enum class SubComposeType { MAIN, diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppSnackbar.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppSnackbar.kt similarity index 97% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppSnackbar.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppSnackbar.kt index 8dbd86cc..956fa389 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppSnackbar.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppSnackbar.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.components +package com.stslex.wizard.core.ui.components import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.BoxScope @@ -27,8 +27,8 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntOffset -import com.stslex.core.ui.theme.AppDimension -import com.stslex.core.ui.theme.toPx +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.toPx import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import kotlin.math.roundToInt diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppToolbar.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppToolbar.kt similarity index 95% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppToolbar.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppToolbar.kt index 8aed75ca..e084868d 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/AppToolbar.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/AppToolbar.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.components +package com.stslex.wizard.core.ui.components import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -15,7 +15,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.AppDimension @Composable fun AppToolbar( diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarSwipeState.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarSwipeState.kt similarity index 62% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarSwipeState.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarSwipeState.kt index 9b6afc73..7cc161fa 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarSwipeState.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarSwipeState.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.components +package com.stslex.wizard.core.ui.components internal enum class SnackbarSwipeState { LEFT, diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarType.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarType.kt similarity index 95% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarType.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarType.kt index 4d069e8d..e23958d9 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/components/SnackbarType.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/components/SnackbarType.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.components +package com.stslex.wizard.core.ui.components import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Done diff --git a/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/di/CoreUiModule.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/di/CoreUiModule.kt new file mode 100644 index 00000000..0410092d --- /dev/null +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/di/CoreUiModule.kt @@ -0,0 +1,18 @@ +package com.stslex.wizard.core.ui.di + +import com.stslex.wizard.core.ui.pager.pager.StorePagerFactory +import com.stslex.wizard.core.ui.pager.pager.StorePagerFactoryImpl +import com.stslex.wizard.core.ui.pager.paging_worker.PagingWorkerFactory +import com.stslex.wizard.core.ui.pager.paging_worker.PagingWorkerFactoryImpl +import org.koin.dsl.module + +val coreUiModule = module { + factory { + PagingWorkerFactoryImpl() + } + factory { + StorePagerFactoryImpl( + workerFactory = get() + ) + } +} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Router.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt similarity index 71% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Router.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt index 3bd46477..0e82b6a3 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Router.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi fun interface Router { operator fun invoke(event: E) diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Store.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt similarity index 87% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Store.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt index bea49bd9..c2fb7c33 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/Store.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt @@ -1,16 +1,16 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.stslex.core.core.AppDispatcher -import com.stslex.core.core.Logger -import com.stslex.core.core.coroutine.AppCoroutineScope -import com.stslex.core.core.coroutine.AppCoroutineScopeImpl -import com.stslex.core.core.coroutineExceptionHandler -import com.stslex.core.ui.mvi.StoreComponent.Action -import com.stslex.core.ui.mvi.StoreComponent.Event -import com.stslex.core.ui.mvi.StoreComponent.Navigation -import com.stslex.core.ui.mvi.StoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.coroutine.AppCoroutineScopeImpl +import com.stslex.wizard.core.core.coroutineExceptionHandler +import com.stslex.wizard.core.ui.mvi.StoreComponent.Action +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event +import com.stslex.wizard.core.ui.mvi.StoreComponent.Navigation +import com.stslex.wizard.core.ui.mvi.StoreComponent.State import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreAbstraction.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreAbstraction.kt similarity index 74% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreAbstraction.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreAbstraction.kt index b22695d8..45f85cb5 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreAbstraction.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreAbstraction.kt @@ -1,8 +1,8 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi -import com.stslex.core.ui.mvi.StoreComponent.Action -import com.stslex.core.ui.mvi.StoreComponent.Event -import com.stslex.core.ui.mvi.StoreComponent.State +import com.stslex.wizard.core.ui.mvi.StoreComponent.Action +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event +import com.stslex.wizard.core.ui.mvi.StoreComponent.State import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreComponent.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreComponent.kt similarity index 95% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreComponent.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreComponent.kt index 6c7f5258..354c5643 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreComponent.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreComponent.kt @@ -1,8 +1,8 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi import androidx.compose.material3.SnackbarDuration import androidx.compose.runtime.Stable -import com.stslex.core.ui.components.SnackbarType +import com.stslex.wizard.core.ui.components.SnackbarType interface StoreComponent { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreExt.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.kt similarity index 93% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreExt.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.kt index 8aae1dda..69bbd1d1 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/mvi/StoreExt.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.kt @@ -1,11 +1,11 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.lifecycle.ViewModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow -import com.stslex.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppNavigator import org.koin.compose.getKoin import org.koin.compose.koinInject import org.koin.core.definition.Definition diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppNavigator.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppNavigator.kt similarity index 80% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppNavigator.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppNavigator.kt index 58f6b6e7..f9742c50 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppNavigator.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppNavigator.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.navigation +package com.stslex.wizard.core.ui.navigation import cafe.adriel.voyager.navigator.Navigator diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppScreen.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppScreen.kt similarity index 84% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppScreen.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppScreen.kt index 58e987d6..336efd0e 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/AppScreen.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/AppScreen.kt @@ -1,6 +1,6 @@ -package com.stslex.core.ui.navigation +package com.stslex.wizard.core.ui.navigation -import com.stslex.core.ui.navigation.args.MatchScreenArgs +import com.stslex.wizard.core.ui.navigation.args.MatchScreenArgs sealed interface AppScreen { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/args/MatchScreenArgs.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/args/MatchScreenArgs.kt similarity index 87% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/args/MatchScreenArgs.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/args/MatchScreenArgs.kt index ad9ccc11..23eac2c4 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/navigation/args/MatchScreenArgs.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/navigation/args/MatchScreenArgs.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.navigation.args +package com.stslex.wizard.core.ui.navigation.args import androidx.compose.runtime.Stable diff --git a/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/mapper/PagingMapper.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/mapper/PagingMapper.kt new file mode 100644 index 00000000..85b47241 --- /dev/null +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/mapper/PagingMapper.kt @@ -0,0 +1,9 @@ +package com.stslex.wizard.core.ui.pager.mapper + +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.ui.base.paging.PagingItem + +fun interface PagingMapper { + + suspend operator fun invoke(item: T): R +} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePager.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePager.kt similarity index 56% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePager.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePager.kt index 77ebc854..58711214 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePager.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePager.kt @@ -1,9 +1,9 @@ -package com.stslex.core.ui.pager.pager +package com.stslex.wizard.core.ui.pager.pager -import com.stslex.core.ui.base.paging.PagingItem -import com.stslex.core.ui.base.paging.PagingState -import com.stslex.core.ui.pager.states.PagerLoadEvents -import com.stslex.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingState +import com.stslex.wizard.core.ui.pager.states.PagerLoadEvents +import com.stslex.wizard.core.ui.pager.states.PagerLoadState import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow diff --git a/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactory.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactory.kt new file mode 100644 index 00000000..88c432b2 --- /dev/null +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactory.kt @@ -0,0 +1,18 @@ +package com.stslex.wizard.core.ui.pager.pager + +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.pager.mapper.PagingMapper + +interface StorePagerFactory { + + fun create( + scope: AppCoroutineScope, + request: suspend (page: Int, pageSize: Int) -> PagingResponse, + mapper: PagingMapper, + config: PagingConfig + ): StorePager +} \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactoryImpl.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactoryImpl.kt similarity index 61% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactoryImpl.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactoryImpl.kt index b9dec3d7..abcc4af5 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerFactoryImpl.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerFactoryImpl.kt @@ -1,12 +1,12 @@ -package com.stslex.core.ui.pager.pager +package com.stslex.wizard.core.ui.pager.pager -import com.stslex.core.core.coroutine.AppCoroutineScope -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingItem -import com.stslex.core.ui.pager.mapper.PagingMapper -import com.stslex.core.ui.pager.paging_worker.PagingWorkerFactory +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.pager.mapper.PagingMapper +import com.stslex.wizard.core.ui.pager.paging_worker.PagingWorkerFactory class StorePagerFactoryImpl( private val workerFactory: PagingWorkerFactory diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerImpl.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerImpl.kt similarity index 82% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerImpl.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerImpl.kt index e1de5ff6..4426b1b6 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/pager/StorePagerImpl.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/pager/StorePagerImpl.kt @@ -1,18 +1,18 @@ -package com.stslex.core.ui.pager.pager +package com.stslex.wizard.core.ui.pager.pager -import com.stslex.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGE -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.ui.base.mapToAppError -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingItem -import com.stslex.core.ui.base.paging.PagingState -import com.stslex.core.ui.base.paging.pagingMap -import com.stslex.core.ui.pager.states.PagerLoadEvents -import com.stslex.core.ui.pager.states.PagerLoadState -import com.stslex.core.ui.pager.mapper.PagingMapper -import com.stslex.core.ui.pager.paging_worker.PagingRequestType -import com.stslex.core.ui.pager.paging_worker.PagingWorker +import com.stslex.wizard.core.core.paging.PagingCoreData.Companion.DEFAULT_PAGE +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.ui.base.mapToAppError +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingState +import com.stslex.wizard.core.ui.base.paging.pagingMap +import com.stslex.wizard.core.ui.pager.states.PagerLoadEvents +import com.stslex.wizard.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.core.ui.pager.mapper.PagingMapper +import com.stslex.wizard.core.ui.pager.paging_worker.PagingRequestType +import com.stslex.wizard.core.ui.pager.paging_worker.PagingWorker import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.Job import kotlinx.coroutines.flow.MutableSharedFlow diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingRequestType.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingRequestType.kt similarity index 50% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingRequestType.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingRequestType.kt index c00cb4b5..0532012d 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingRequestType.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingRequestType.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.pager.paging_worker +package com.stslex.wizard.core.ui.pager.paging_worker enum class PagingRequestType { DEFAULT, diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorker.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorker.kt similarity index 71% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorker.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorker.kt index 3de5db0c..1b1d2ca9 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorker.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorker.kt @@ -1,7 +1,7 @@ -package com.stslex.core.ui.pager.paging_worker +package com.stslex.wizard.core.ui.pager.paging_worker -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse import kotlinx.coroutines.CoroutineScope interface PagingWorker { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactory.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactory.kt similarity index 61% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactory.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactory.kt index 69480db1..d1e75ecd 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactory.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactory.kt @@ -1,6 +1,6 @@ -package com.stslex.core.ui.pager.paging_worker +package com.stslex.wizard.core.ui.pager.paging_worker -import com.stslex.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope interface PagingWorkerFactory { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt similarity index 77% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt index ee6c8763..25b19df1 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerFactoryImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.core.ui.pager.paging_worker +package com.stslex.wizard.core.ui.pager.paging_worker -import com.stslex.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope class PagingWorkerFactoryImpl : PagingWorkerFactory { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerImpl.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerImpl.kt similarity index 93% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerImpl.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerImpl.kt index c882bec6..6e5c4808 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/paging_worker/PagingWorkerImpl.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/paging_worker/PagingWorkerImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.core.ui.pager.paging_worker +package com.stslex.wizard.core.ui.pager.paging_worker -import com.stslex.core.core.coroutine.AppCoroutineScope -import com.stslex.core.core.paging.PagingCoreItem -import com.stslex.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.coroutine.AppCoroutineScope +import com.stslex.wizard.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingResponse import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Job diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadEvents.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadEvents.kt similarity index 51% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadEvents.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadEvents.kt index 6aaacce6..23f9bbca 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadEvents.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadEvents.kt @@ -1,6 +1,6 @@ -package com.stslex.core.ui.pager.states +package com.stslex.wizard.core.ui.pager.states -import com.stslex.core.ui.base.AppError +import com.stslex.wizard.core.ui.base.AppError sealed interface PagerLoadEvents { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadState.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadState.kt similarity index 78% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadState.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadState.kt index 88e37571..e54b418d 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/pager/states/PagerLoadState.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/pager/states/PagerLoadState.kt @@ -1,6 +1,6 @@ -package com.stslex.core.ui.pager.states +package com.stslex.wizard.core.ui.pager.states -import com.stslex.core.ui.base.AppError +import com.stslex.wizard.core.ui.base.AppError sealed interface PagerLoadState { diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppDimension.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppDimension.kt similarity index 93% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppDimension.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppDimension.kt index 196d4b69..3f6bd9ce 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppDimension.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppDimension.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.theme +package com.stslex.wizard.core.ui.theme import androidx.compose.ui.unit.dp diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppTheme.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppTheme.kt similarity index 75% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppTheme.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppTheme.kt index 1c2e7621..d2a679d7 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/AppTheme.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/AppTheme.kt @@ -1,13 +1,10 @@ -package com.stslex.core.ui.theme +package com.stslex.wizard.core.ui.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme import androidx.compose.material3.darkColorScheme import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider -import com.stslex.core.network.utils.AppKamelConfig -import io.kamel.image.config.LocalKamelConfig @Composable fun AppTheme( @@ -23,9 +20,8 @@ fun AppTheme( colorScheme = colors, content = content ) +// todo kamel migration test // CompositionLocalProvider( // LocalKamelConfig provides AppKamelConfig.KamelLoggingConfig -// ) { -// -// } +// ) {} } \ No newline at end of file diff --git a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/DimenExt.kt b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/DimenExt.kt similarity index 94% rename from core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/DimenExt.kt rename to core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/DimenExt.kt index a894d728..a6db08f3 100644 --- a/core/ui/src/commonMain/kotlin/com/stslex/core/ui/theme/DimenExt.kt +++ b/core/ui/src/commonMain/kotlin/com/stslex/wizard/core/ui/theme/DimenExt.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.theme +package com.stslex.wizard.core.ui.theme import androidx.compose.runtime.Composable import androidx.compose.runtime.ReadOnlyComposable diff --git a/core/ui/src/appleMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.apple.kt b/core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.ios.kt similarity index 91% rename from core/ui/src/appleMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.apple.kt rename to core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.ios.kt index 84d6713a..b997d890 100644 --- a/core/ui/src/appleMain/kotlin/com/stslex/core/ui/base/image/NativeNetworkImage.apple.kt +++ b/core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/base/image/NativeNetworkImage.ios.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.base.image +package com.stslex.wizard.core.ui.base.image import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/core/ui/src/iosMain/kotlin/com/stslex/core/ui/mvi/StoreExt.ios.kt b/core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.ios.kt similarity index 91% rename from core/ui/src/iosMain/kotlin/com/stslex/core/ui/mvi/StoreExt.ios.kt rename to core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.ios.kt index 37b75872..7ec579b9 100644 --- a/core/ui/src/iosMain/kotlin/com/stslex/core/ui/mvi/StoreExt.ios.kt +++ b/core/ui/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/StoreExt.ios.kt @@ -1,4 +1,4 @@ -package com.stslex.core.ui.mvi +package com.stslex.wizard.core.ui.mvi import androidx.lifecycle.ViewModel import org.koin.core.definition.Definition diff --git a/feature/auth/build.gradle.kts b/feature/auth/build.gradle.kts index ec3b4b8a..71d5a3d3 100644 --- a/feature/auth/build.gradle.kts +++ b/feature/auth/build.gradle.kts @@ -1,33 +1,8 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/FeatureAuthPodfile") - framework { - baseName = "featureAuth" - } - } - sourceSets { commonMain.dependencies { implementation(project(":core:core")) @@ -35,30 +10,5 @@ kotlin { implementation(project(":core:network")) implementation(project(":core:database")) } - commonTest.dependencies { - implementation(libs.kotlin.test) - } } } - -android { - namespace = "com.stslex.feature.auth" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/di/AuthModule.kt b/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/di/AuthModule.kt deleted file mode 100644 index baaa4f5e..00000000 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/di/AuthModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.stslex.feature.auth.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.auth.data.AuthRepository -import com.stslex.feature.auth.data.AuthRepositoryImpl -import com.stslex.feature.auth.domain.AuthInteractor -import com.stslex.feature.auth.domain.AuthInteractorImpl -import com.stslex.feature.auth.navigation.AuthRouter -import com.stslex.feature.auth.navigation.AuthRouterImpl -import com.stslex.feature.auth.ui.store.AuthStore -import org.koin.dsl.module - -val featureAuthModule = module { - factory { AuthRepositoryImpl(client = get()) } - factory { AuthInteractorImpl(authRepository = get()) } - factory { AuthRouterImpl(navigator = get()) } - storeDefinition { - AuthStore( - interactor = get(), - router = get(), - dispatcher = get() - ) - } -} \ No newline at end of file diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouter.kt b/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouter.kt deleted file mode 100644 index bd545d46..00000000 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.stslex.feature.auth.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Navigation - -interface AuthRouter : Router - diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepository.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepository.kt similarity index 78% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepository.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepository.kt index b27f2457..07f43c48 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepository.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepository.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.data +package com.stslex.wizard.feature.auth.data interface AuthRepository { diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepositoryImpl.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepositoryImpl.kt similarity index 75% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepositoryImpl.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepositoryImpl.kt index 367aa46e..79e9fbcc 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/data/AuthRepositoryImpl.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/data/AuthRepositoryImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.auth.data +package com.stslex.wizard.feature.auth.data -import com.stslex.core.network.clients.auth.client.AuthClient +import com.stslex.wizard.core.network.clients.auth.client.AuthClient class AuthRepositoryImpl( private val client: AuthClient diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/AuthModule.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/AuthModule.kt new file mode 100644 index 00000000..79e066fb --- /dev/null +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/AuthModule.kt @@ -0,0 +1,24 @@ +package com.stslex.wizard.feature.auth.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.auth.data.AuthRepository +import com.stslex.wizard.feature.auth.data.AuthRepositoryImpl +import com.stslex.wizard.feature.auth.domain.AuthInteractor +import com.stslex.wizard.feature.auth.domain.AuthInteractorImpl +import com.stslex.wizard.feature.auth.navigation.AuthRouter +import com.stslex.wizard.feature.auth.navigation.AuthRouterImpl +import com.stslex.wizard.feature.auth.ui.store.AuthStore +import org.koin.dsl.module + +val featureAuthModule = module { + factory { AuthRepositoryImpl(client = get()) } + factory { AuthInteractorImpl(authRepository = get()) } + factory { AuthRouterImpl(navigator = get()) } + storeDefinition { + AuthStore( + interactor = get(), + router = get(), + dispatcher = get() + ) + } +} \ No newline at end of file diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractor.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractor.kt similarity index 77% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractor.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractor.kt index d8dcf059..9185fcb7 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractor.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractor.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.domain +package com.stslex.wizard.feature.auth.domain interface AuthInteractor { diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractorImpl.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractorImpl.kt similarity index 82% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractorImpl.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractorImpl.kt index 40c28d1e..52d88195 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/domain/AuthInteractorImpl.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/domain/AuthInteractorImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.auth.domain +package com.stslex.wizard.feature.auth.domain -import com.stslex.feature.auth.data.AuthRepository +import com.stslex.wizard.feature.auth.data.AuthRepository class AuthInteractorImpl( private val authRepository: AuthRepository diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt new file mode 100644 index 00000000..29ec6f9c --- /dev/null +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt @@ -0,0 +1,7 @@ +package com.stslex.wizard.feature.auth.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Navigation + +interface AuthRouter : Router + diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouterImpl.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouterImpl.kt similarity index 50% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouterImpl.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouterImpl.kt index 7659fd3f..cb4ccfaf 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/navigation/AuthRouterImpl.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.auth.navigation +package com.stslex.wizard.feature.auth.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Navigation +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Navigation class AuthRouterImpl( private val navigator: AppNavigator diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/AuthScreen.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/AuthScreen.kt similarity index 82% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/AuthScreen.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/AuthScreen.kt index b910aadc..6aae9888 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/AuthScreen.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/AuthScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui +package com.stslex.wizard.feature.auth.ui import androidx.compose.foundation.background import androidx.compose.foundation.gestures.Orientation @@ -20,19 +20,19 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.components.AppSnackbarHost -import com.stslex.core.ui.mvi.getStore -import com.stslex.core.ui.mvi.setupNavigator -import com.stslex.core.ui.theme.AppDimension -import com.stslex.core.ui.theme.toPx -import com.stslex.feature.auth.ui.components.AuthFieldsColumn -import com.stslex.feature.auth.ui.components.AuthTitle -import com.stslex.feature.auth.ui.model.screen.AuthScreenState -import com.stslex.feature.auth.ui.model.screen.rememberAuthScreenState -import com.stslex.feature.auth.ui.store.AuthStore -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Event -import com.stslex.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState +import com.stslex.wizard.core.ui.components.AppSnackbarHost +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.core.ui.mvi.setupNavigator +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.toPx +import com.stslex.wizard.feature.auth.ui.components.AuthFieldsColumn +import com.stslex.wizard.feature.auth.ui.components.AuthTitle +import com.stslex.wizard.feature.auth.ui.model.screen.AuthScreenState +import com.stslex.wizard.feature.auth.ui.model.screen.rememberAuthScreenState +import com.stslex.wizard.feature.auth.ui.store.AuthStore +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Event +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState object AuthScreen : Screen { diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthFieldsColumn.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthFieldsColumn.kt similarity index 92% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthFieldsColumn.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthFieldsColumn.kt index dcacf56f..d53011c2 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthFieldsColumn.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthFieldsColumn.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.components +package com.stslex.wizard.feature.auth.ui.components import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.tween @@ -20,10 +20,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.KeyboardType -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.auth.ui.model.screen.AuthScreenState -import com.stslex.feature.auth.ui.model.screen.text_field.LoginTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.UsernameTextFieldState +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.auth.ui.model.screen.AuthScreenState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.LoginTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.UsernameTextFieldState @Composable internal fun AuthFieldsColumn( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthPasswordTextField.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthPasswordTextField.kt similarity index 86% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthPasswordTextField.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthPasswordTextField.kt index 9f912114..cf3371e5 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthPasswordTextField.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthPasswordTextField.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.components +package com.stslex.wizard.feature.auth.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth @@ -12,9 +12,9 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.KeyboardType -import com.stslex.feature.auth.ui.model.screen.text_field.PasswordInputTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.PasswordSubmitTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.PasswordInputTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.PasswordSubmitTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState @Composable internal fun AuthPasswordTextField( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthSubmitButton.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthSubmitButton.kt similarity index 91% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthSubmitButton.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthSubmitButton.kt index 7b201609..196d159e 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthSubmitButton.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthSubmitButton.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.components +package com.stslex.wizard.feature.auth.ui.components import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.Spring @@ -11,7 +11,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback import androidx.compose.ui.text.style.TextAlign -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState @Composable internal fun AuthSubmitButton( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthTitle.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthTitle.kt similarity index 95% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthTitle.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthTitle.kt index 1f7984b3..e5f90d7f 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/components/AuthTitle.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/components/AuthTitle.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.components +package com.stslex.wizard.feature.auth.ui.components import androidx.compose.animation.core.animateFloatAsState import androidx.compose.foundation.clickable @@ -24,8 +24,8 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.scale import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState import kotlinx.coroutines.launch @OptIn(ExperimentalMaterialApi::class) diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/SnackbarActionType.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/SnackbarActionType.kt similarity index 88% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/SnackbarActionType.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/SnackbarActionType.kt index d6ed3e9f..ee5dee97 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/SnackbarActionType.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/SnackbarActionType.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.model +package com.stslex.wizard.feature.auth.ui.model enum class SnackbarActionType(val action: String) { ERROR("error"), diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/AuthScreenState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/AuthScreenState.kt similarity index 79% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/AuthScreenState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/AuthScreenState.kt index e691431c..c64b3399 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/AuthScreenState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/AuthScreenState.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.model.screen +package com.stslex.wizard.feature.auth.ui.model.screen import androidx.compose.animation.core.Spring import androidx.compose.animation.core.spring @@ -15,18 +15,18 @@ import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.platform.SoftwareKeyboardController -import com.stslex.feature.auth.ui.model.screen.text_field.LoginTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.PasswordInputTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.PasswordSubmitTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.UsernameTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.rememberLoginTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.rememberPasswordInputTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.rememberPasswordSubmitTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.rememberUsernameTextFieldState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.State +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.LoginTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.PasswordInputTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.PasswordSubmitTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.UsernameTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.rememberLoginTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.rememberPasswordInputTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.rememberPasswordSubmitTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.rememberUsernameTextFieldState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.State @Stable data class AuthScreenState @OptIn(ExperimentalMaterialApi::class) constructor( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt similarity index 75% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt index 317a8a5d..2da76db8 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/LoginTextFieldState.kt @@ -1,10 +1,10 @@ -package com.stslex.feature.auth.ui.model.screen.text_field +package com.stslex.wizard.feature.auth.ui.model.screen.text_field import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable import androidx.compose.runtime.remember -import com.stslex.feature.auth.ui.model.screen.text_field.base.AuthTextField -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action.InputAction +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.base.AuthTextField +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action.InputAction @Stable data class LoginTextFieldState( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt similarity index 78% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt index 0b0dccd3..6505760d 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordInputTextFieldState.kt @@ -1,14 +1,14 @@ -package com.stslex.feature.auth.ui.model.screen.text_field +package com.stslex.wizard.feature.auth.ui.model.screen.text_field import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable import androidx.compose.runtime.remember import androidx.compose.ui.hapticfeedback.HapticFeedback import androidx.compose.ui.platform.LocalHapticFeedback -import com.stslex.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.hidden.HiddenState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action.InputAction -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.hidden.HiddenState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action.InputAction +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState @Stable data class PasswordInputTextFieldState( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt similarity index 79% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt index 5dc9bd3e..196d8a61 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/PasswordSubmitTextFieldState.kt @@ -1,13 +1,13 @@ -package com.stslex.feature.auth.ui.model.screen.text_field +package com.stslex.wizard.feature.auth.ui.model.screen.text_field import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable import androidx.compose.runtime.remember import androidx.compose.ui.hapticfeedback.HapticFeedback import androidx.compose.ui.platform.LocalHapticFeedback -import com.stslex.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState -import com.stslex.feature.auth.ui.model.screen.text_field.hidden.HiddenState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action.InputAction.PasswordSubmitInput +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.base.PasswordTextFieldState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.hidden.HiddenState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action.InputAction.PasswordSubmitInput @Stable data class PasswordSubmitTextFieldState( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt similarity index 76% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt index fdbf4e52..2737114c 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/UsernameTextFieldState.kt @@ -1,10 +1,10 @@ -package com.stslex.feature.auth.ui.model.screen.text_field +package com.stslex.wizard.feature.auth.ui.model.screen.text_field import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable import androidx.compose.runtime.remember -import com.stslex.feature.auth.ui.model.screen.text_field.base.AuthTextField -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action.InputAction +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.base.AuthTextField +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action.InputAction @Stable data class UsernameTextFieldState( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt similarity index 88% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt index 9f0e58e1..74ca6dbc 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/AuthTextField.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.model.screen.text_field.base +package com.stslex.wizard.feature.auth.ui.model.screen.text_field.base import androidx.compose.runtime.Stable diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt similarity index 90% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt index 42e7de98..1d5d4727 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/base/PasswordTextFieldState.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.model.screen.text_field.base +package com.stslex.wizard.feature.auth.ui.model.screen.text_field.base import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.AccountBox @@ -9,7 +9,7 @@ import androidx.compose.ui.hapticfeedback.HapticFeedback import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.input.VisualTransformation -import com.stslex.feature.auth.ui.model.screen.text_field.hidden.HiddenState +import com.stslex.wizard.feature.auth.ui.model.screen.text_field.hidden.HiddenState @Stable abstract class PasswordTextFieldState( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt similarity index 80% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt index adbb76b1..3f9839ac 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/model/screen/text_field/hidden/HiddenState.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.auth.ui.model.screen.text_field.hidden +package com.stslex.wizard.feature.auth.ui.model.screen.text_field.hidden import androidx.compose.runtime.Stable import androidx.compose.runtime.mutableStateOf diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStore.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt similarity index 86% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStore.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt index b99fe1c3..21359c7c 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStore.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt @@ -1,16 +1,16 @@ -package com.stslex.feature.auth.ui.store +package com.stslex.wizard.feature.auth.ui.store -import com.stslex.core.core.AppDispatcher -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.auth.domain.AuthInteractor -import com.stslex.feature.auth.navigation.AuthRouter -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Action -import com.stslex.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Event -import com.stslex.feature.auth.ui.store.AuthStoreComponent.Navigation -import com.stslex.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState -import com.stslex.feature.auth.ui.store.AuthStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.auth.domain.AuthInteractor +import com.stslex.wizard.feature.auth.navigation.AuthRouter +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Action +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.AuthFieldsState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Event +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.Navigation +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.ScreenLoadingState +import com.stslex.wizard.feature.auth.ui.store.AuthStoreComponent.State import kotlinx.coroutines.delay class AuthStore( diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStoreComponent.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreComponent.kt similarity index 95% rename from feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStoreComponent.kt rename to feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreComponent.kt index 715e2839..2e24648c 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/feature/auth/ui/store/AuthStoreComponent.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreComponent.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.auth.ui.store +package com.stslex.wizard.feature.auth.ui.store -import com.stslex.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent interface AuthStoreComponent : StoreComponent { diff --git a/feature/favourite/build.gradle.kts b/feature/favourite/build.gradle.kts index 681c5104..1152787c 100644 --- a/feature/favourite/build.gradle.kts +++ b/feature/favourite/build.gradle.kts @@ -1,64 +1,11 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = - project.file(project.rootProject.projectDir.path + "/iosApp/FeatureFavouritePodfile") - framework { - baseName = "featureFavourite" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.favourite" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) } } - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataMapper.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataMapper.kt deleted file mode 100644 index 8f68ed30..00000000 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.stslex.feature.favourite.data.model - -import com.stslex.core.network.clients.profile.model.response.UserFavouriteResultResponse - -fun UserFavouriteResultResponse.toData() = FavouriteDataModel( - uuid = uuid, - title = title, - isFavourite = isFavourite, -) \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/di/FeatureFavouriteModule.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/di/FeatureFavouriteModule.kt deleted file mode 100644 index 8a369a46..00000000 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/di/FeatureFavouriteModule.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.stslex.feature.favourite.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.favourite.data.repository.FavouriteRepository -import com.stslex.feature.favourite.data.repository.FavouriteRepositoryImpl -import com.stslex.feature.favourite.domain.interactor.FavouriteInteractor -import com.stslex.feature.favourite.domain.interactor.FavouriteInteractorImpl -import com.stslex.feature.favourite.navigation.FavouriteRouter -import com.stslex.feature.favourite.navigation.FavouriteRouterImpl -import com.stslex.feature.favourite.ui.store.FavouriteStore -import org.koin.dsl.module - -val featureFavouriteModule = module { - - factory { FavouriteRepositoryImpl(client = get()) } - factory { - FavouriteInteractorImpl(repository = get()) - } - factory { FavouriteRouterImpl(navigator = get()) } - storeDefinition { - FavouriteStore( - interactor = get(), - appDispatcher = get(), - router = get(), - pagingFactory = get() - ) - } -} \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouter.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouter.kt deleted file mode 100644 index 14b352d2..00000000 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.favourite.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Navigation - -interface FavouriteRouter : Router diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouterImpl.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouterImpl.kt deleted file mode 100644 index d9f32528..00000000 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/navigation/FavouriteRouterImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.stslex.feature.favourite.navigation - -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Navigation -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Navigation.OpenFilm - -class FavouriteRouterImpl( - private val navigator: AppNavigator -) : FavouriteRouter { - - override fun invoke(event: Navigation) { - when (event) { - is OpenFilm -> navigator.navigate(AppScreen.Film(id = event.uuid)) - } - } -} \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/FavouriteScreen.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/FavouriteScreen.kt similarity index 69% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/FavouriteScreen.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/FavouriteScreen.kt index 5a1fab44..dd9f7967 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/FavouriteScreen.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/FavouriteScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite +package com.stslex.wizard.feature.favourite import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -6,10 +6,10 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.mvi.getStore -import com.stslex.feature.favourite.ui.components.FavouriteScreen -import com.stslex.feature.favourite.ui.store.FavouriteStore -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Action +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.feature.favourite.ui.components.FavouriteScreen +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Action data class FavouriteScreen( val uuid: String diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataMapper.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataMapper.kt new file mode 100644 index 00000000..92db9fd6 --- /dev/null +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataMapper.kt @@ -0,0 +1,9 @@ +package com.stslex.wizard.feature.favourite.data.model + +import com.stslex.wizard.core.network.clients.profile.model.response.UserFavouriteResultResponse + +fun UserFavouriteResultResponse.toData() = FavouriteDataModel( + uuid = uuid, + title = title, + isFavourite = isFavourite, +) \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataModel.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataModel.kt similarity index 54% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataModel.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataModel.kt index 383d5047..b33180ce 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/model/FavouriteDataModel.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/model/FavouriteDataModel.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.favourite.data.model +package com.stslex.wizard.feature.favourite.data.model -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem data class FavouriteDataModel( override val uuid: String, diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepository.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepository.kt similarity index 61% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepository.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepository.kt index 5be72c19..06c8c88d 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepository.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepository.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.favourite.data.repository +package com.stslex.wizard.feature.favourite.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.favourite.data.model.FavouriteDataModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.favourite.data.model.FavouriteDataModel interface FavouriteRepository { diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepositoryImpl.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepositoryImpl.kt similarity index 63% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepositoryImpl.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepositoryImpl.kt index 1c51ed26..e59b2d5c 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/data/repository/FavouriteRepositoryImpl.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/data/repository/FavouriteRepositoryImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.favourite.data.repository +package com.stslex.wizard.feature.favourite.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.core.paging.pagingMap -import com.stslex.core.network.clients.profile.client.ProfileClient -import com.stslex.core.network.clients.profile.model.request.PagingProfileRequest -import com.stslex.feature.favourite.data.model.FavouriteDataModel -import com.stslex.feature.favourite.data.model.toData +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.pagingMap +import com.stslex.wizard.core.network.clients.profile.client.ProfileClient +import com.stslex.wizard.core.network.clients.profile.model.request.PagingProfileRequest +import com.stslex.wizard.feature.favourite.data.model.FavouriteDataModel +import com.stslex.wizard.feature.favourite.data.model.toData class FavouriteRepositoryImpl( private val client: ProfileClient diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/FeatureFavouriteModule.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/FeatureFavouriteModule.kt new file mode 100644 index 00000000..3a237b50 --- /dev/null +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/FeatureFavouriteModule.kt @@ -0,0 +1,28 @@ +package com.stslex.wizard.feature.favourite.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.favourite.data.repository.FavouriteRepository +import com.stslex.wizard.feature.favourite.data.repository.FavouriteRepositoryImpl +import com.stslex.wizard.feature.favourite.domain.interactor.FavouriteInteractor +import com.stslex.wizard.feature.favourite.domain.interactor.FavouriteInteractorImpl +import com.stslex.wizard.feature.favourite.navigation.FavouriteRouter +import com.stslex.wizard.feature.favourite.navigation.FavouriteRouterImpl +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore +import org.koin.dsl.module + +val featureFavouriteModule = module { + + factory { FavouriteRepositoryImpl(client = get()) } + factory { + FavouriteInteractorImpl(repository = get()) + } + factory { FavouriteRouterImpl(navigator = get()) } + storeDefinition { + FavouriteStore( + interactor = get(), + appDispatcher = get(), + router = get(), + pagingFactory = get() + ) + } +} \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractor.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractor.kt similarity index 56% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractor.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractor.kt index 4ead1a1d..903d4da2 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractor.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractor.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.favourite.domain.interactor +package com.stslex.wizard.feature.favourite.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.favourite.domain.model.FavouriteDomainModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.favourite.domain.model.FavouriteDomainModel interface FavouriteInteractor { diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt similarity index 61% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt index cfcaa3d9..1f374b15 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/interactor/FavouriteInteractorImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.favourite.domain.interactor +package com.stslex.wizard.feature.favourite.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.core.paging.pagingMap -import com.stslex.feature.favourite.data.repository.FavouriteRepository -import com.stslex.feature.favourite.domain.model.FavouriteDomainModel -import com.stslex.feature.favourite.domain.model.toData -import com.stslex.feature.favourite.domain.model.toDomain +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.pagingMap +import com.stslex.wizard.feature.favourite.data.repository.FavouriteRepository +import com.stslex.wizard.feature.favourite.domain.model.FavouriteDomainModel +import com.stslex.wizard.feature.favourite.domain.model.toData +import com.stslex.wizard.feature.favourite.domain.model.toDomain class FavouriteInteractorImpl( private val repository: FavouriteRepository diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainMapper.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainMapper.kt similarity index 66% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainMapper.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainMapper.kt index 6df66c43..22288f79 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainMapper.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.favourite.domain.model +package com.stslex.wizard.feature.favourite.domain.model -import com.stslex.feature.favourite.data.model.FavouriteDataModel +import com.stslex.wizard.feature.favourite.data.model.FavouriteDataModel fun FavouriteDataModel.toDomain() = FavouriteDomainModel( uuid = uuid, diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainModel.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainModel.kt similarity index 54% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainModel.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainModel.kt index be086250..43eab0c3 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/domain/model/FavouriteDomainModel.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/domain/model/FavouriteDomainModel.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.favourite.domain.model +package com.stslex.wizard.feature.favourite.domain.model -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem data class FavouriteDomainModel( override val uuid: String, diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt new file mode 100644 index 00000000..baebe474 --- /dev/null +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.favourite.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Navigation + +interface FavouriteRouter : Router diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouterImpl.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouterImpl.kt new file mode 100644 index 00000000..f27e16ee --- /dev/null +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouterImpl.kt @@ -0,0 +1,17 @@ +package com.stslex.wizard.feature.favourite.navigation + +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Navigation +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Navigation.OpenFilm + +class FavouriteRouterImpl( + private val navigator: AppNavigator +) : FavouriteRouter { + + override fun invoke(event: Navigation) { + when (event) { + is OpenFilm -> navigator.navigate(AppScreen.Film(id = event.uuid)) + } + } +} \ No newline at end of file diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/FavouriteScreen.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/FavouriteScreen.kt similarity index 71% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/FavouriteScreen.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/FavouriteScreen.kt index 6b652ca0..bf2a05de 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/FavouriteScreen.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/FavouriteScreen.kt @@ -1,16 +1,16 @@ -package com.stslex.feature.favourite.ui.components +package com.stslex.wizard.feature.favourite.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.feature.favourite.ui.components.content.FavouriteScreenContent -import com.stslex.feature.favourite.ui.components.error.FavouriteScreenError -import com.stslex.feature.favourite.ui.components.shimmer.FavouriteScreenShimmer -import com.stslex.feature.favourite.ui.store.FavouriteScreenState -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Action +import com.stslex.wizard.feature.favourite.ui.components.content.FavouriteScreenContent +import com.stslex.wizard.feature.favourite.ui.components.error.FavouriteScreenError +import com.stslex.wizard.feature.favourite.ui.components.shimmer.FavouriteScreenShimmer +import com.stslex.wizard.feature.favourite.ui.store.FavouriteScreenState +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Action @Composable internal fun FavouriteScreen( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContent.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContent.kt similarity index 82% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContent.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContent.kt index 63c2b690..873dc1e6 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContent.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContent.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.content +package com.stslex.wizard.feature.favourite.ui.components.content import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -9,13 +9,13 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.core.ui.base.paging.PagingColumn -import com.stslex.core.ui.base.paging.PagingUiState -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.favourite.ui.components.empty.FavouriteScreenEmpty -import com.stslex.feature.favourite.ui.components.shimmer.FavouriteScreenShimmer -import com.stslex.feature.favourite.ui.model.FavouriteModel -import com.stslex.feature.favourite.ui.store.FavouriteScreenState +import com.stslex.wizard.core.ui.base.paging.PagingColumn +import com.stslex.wizard.core.ui.base.paging.PagingUiState +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.favourite.ui.components.empty.FavouriteScreenEmpty +import com.stslex.wizard.feature.favourite.ui.components.shimmer.FavouriteScreenShimmer +import com.stslex.wizard.feature.favourite.ui.model.FavouriteModel +import com.stslex.wizard.feature.favourite.ui.store.FavouriteScreenState @Composable internal fun FavouriteScreenContent( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt similarity index 91% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt index 68813b34..326e19a5 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentItem.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.content +package com.stslex.wizard.feature.favourite.ui.components.content import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth @@ -14,8 +14,8 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.favourite.ui.model.FavouriteModel +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.favourite.ui.model.FavouriteModel @Composable internal fun FavouriteScreenContentItem( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt similarity index 66% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt index d12548f0..92a053e2 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenContentLoading.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.favourite.ui.components.content +package com.stslex.wizard.feature.favourite.ui.components.content import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.core.ui.base.DotsPrintAnimation +import com.stslex.wizard.core.ui.base.DotsPrintAnimation @Composable fun FavouriteScreenContentLoading( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt similarity index 87% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt index 71d91b24..d3475e7c 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/content/FavouriteScreenSearchField.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.content +package com.stslex.wizard.feature.favourite.ui.components.content import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -6,7 +6,7 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.TextField import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.AppDimension @Composable diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt similarity index 88% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt index 4068fc66..b9ece0d5 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/empty/FavouriteScreenEmpty.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.empty +package com.stslex.wizard.feature.favourite.ui.components.empty import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/error/FavouriteScreenError.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/error/FavouriteScreenError.kt similarity index 79% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/error/FavouriteScreenError.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/error/FavouriteScreenError.kt index 44cc044a..ba337d47 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/error/FavouriteScreenError.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/error/FavouriteScreenError.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.error +package com.stslex.wizard.feature.favourite.ui.components.error import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -6,7 +6,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.feature.favourite.ui.store.FavouriteScreenState +import com.stslex.wizard.feature.favourite.ui.store.FavouriteScreenState @Composable internal fun FavouriteScreenError( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt similarity index 90% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt index d4002115..232df10c 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/components/shimmer/FavouriteScreenShimmer.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.favourite.ui.components.shimmer +package com.stslex.wizard.feature.favourite.ui.components.shimmer import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -14,8 +14,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.unit.dp -import com.stslex.core.ui.base.shimmerLoadingAnimation -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.base.shimmerLoadingAnimation +import com.stslex.wizard.core.ui.theme.AppDimension @Composable fun FavouriteScreenShimmer( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteModel.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteModel.kt similarity index 61% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteModel.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteModel.kt index ed67bfe6..ba4d003b 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteModel.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteModel.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.favourite.ui.model +package com.stslex.wizard.feature.favourite.ui.model import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingItem @Stable data class FavouriteModel( diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteUiMapper.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteUiMapper.kt similarity index 65% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteUiMapper.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteUiMapper.kt index fec5d9f0..31ab194e 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/model/FavouriteUiMapper.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/model/FavouriteUiMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.favourite.ui.model +package com.stslex.wizard.feature.favourite.ui.model -import com.stslex.feature.favourite.domain.model.FavouriteDomainModel +import com.stslex.wizard.feature.favourite.domain.model.FavouriteDomainModel fun FavouriteDomainModel.toUI() = FavouriteModel( uuid = uuid, diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteScreenState.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteScreenState.kt similarity index 85% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteScreenState.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteScreenState.kt index 9f2c606d..0dd3cee8 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteScreenState.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteScreenState.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.favourite.ui.store +package com.stslex.wizard.feature.favourite.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.AppError -import com.stslex.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.core.ui.base.AppError +import com.stslex.wizard.core.ui.pager.states.PagerLoadState @Stable sealed interface FavouriteScreenState { diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStore.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt similarity index 79% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStore.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt index 2b573f5f..9a88f9d7 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStore.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt @@ -1,22 +1,22 @@ -package com.stslex.feature.favourite.ui.store - -import com.stslex.core.core.AppDispatcher -import com.stslex.core.ui.base.mapToAppError -import com.stslex.core.ui.base.paging.toUi -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.core.ui.pager.pager.StorePager -import com.stslex.core.ui.pager.pager.StorePagerFactory -import com.stslex.core.ui.pager.states.PagerLoadState -import com.stslex.feature.favourite.domain.interactor.FavouriteInteractor -import com.stslex.feature.favourite.navigation.FavouriteRouter -import com.stslex.feature.favourite.ui.model.FavouriteModel -import com.stslex.feature.favourite.ui.model.toDomain -import com.stslex.feature.favourite.ui.model.toUI -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Action -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Event -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.Navigation -import com.stslex.feature.favourite.ui.store.FavouriteStoreComponent.State +package com.stslex.wizard.feature.favourite.ui.store + +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.ui.base.mapToAppError +import com.stslex.wizard.core.ui.base.paging.toUi +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.core.ui.pager.pager.StorePager +import com.stslex.wizard.core.ui.pager.pager.StorePagerFactory +import com.stslex.wizard.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.feature.favourite.domain.interactor.FavouriteInteractor +import com.stslex.wizard.feature.favourite.navigation.FavouriteRouter +import com.stslex.wizard.feature.favourite.ui.model.FavouriteModel +import com.stslex.wizard.feature.favourite.ui.model.toDomain +import com.stslex.wizard.feature.favourite.ui.model.toUI +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Action +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Event +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.Navigation +import com.stslex.wizard.feature.favourite.ui.store.FavouriteStoreComponent.State import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.Job import kotlinx.coroutines.flow.distinctUntilChanged diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStoreComponent.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreComponent.kt similarity index 80% rename from feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStoreComponent.kt rename to feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreComponent.kt index 33525170..970a6a79 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/feature/favourite/ui/store/FavouriteStoreComponent.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreComponent.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.favourite.ui.store +package com.stslex.wizard.feature.favourite.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingUiState -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.favourite.ui.model.FavouriteModel +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingUiState +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.favourite.ui.model.FavouriteModel interface FavouriteStoreComponent : StoreComponent { diff --git a/feature/film/build.gradle.kts b/feature/film/build.gradle.kts index 7f34883a..390591e8 100644 --- a/feature/film/build.gradle.kts +++ b/feature/film/build.gradle.kts @@ -1,64 +1,13 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/FeatureFilmPodfile") - framework { - baseName = "featureFilm" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - implementation(project(":core:database")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.film" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) + implementation(project(":core:database")) } } -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/di/FilmModule.kt b/feature/film/src/commonMain/kotlin/com/stslex/feature/film/di/FilmModule.kt deleted file mode 100644 index 118c5a00..00000000 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/di/FilmModule.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.stslex.feature.film.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.film.data.repository.FilmRepository -import com.stslex.feature.film.data.repository.FilmRepositoryImpl -import com.stslex.feature.film.domain.interactor.FilmInteractor -import com.stslex.feature.film.domain.interactor.FilmInteractorImpl -import com.stslex.feature.film.navigation.FilmRouter -import com.stslex.feature.film.navigation.FilmRouterImpl -import com.stslex.feature.film.ui.store.FilmStore -import org.koin.dsl.module - -val featureFilmModule = module { - storeDefinition { - FilmStore( - interactor = get(), - appDispatcher = get(), - router = get(), - ) - } - factory { - FilmRouterImpl(navigator = get()) - } - factory { FilmInteractorImpl(repository = get()) } - factory { - FilmRepositoryImpl( - favouriteDatasource = get(), - client = get(), - profileClient = get() - ) - } -} \ No newline at end of file diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouter.kt b/feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouter.kt deleted file mode 100644 index 9d0323d8..00000000 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.film.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.film.ui.store.FilmStoreComponent.Navigation - -interface FilmRouter : Router diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmData.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmData.kt similarity index 89% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmData.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmData.kt index 473cba9e..322b6cec 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmData.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.data.model +package com.stslex.wizard.feature.film.data.model data class FilmData( val id: String, diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmDataMapper.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmDataMapper.kt similarity index 78% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmDataMapper.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmDataMapper.kt index 48f6469a..acf85e68 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/model/FilmDataMapper.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/model/FilmDataMapper.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.film.data.model +package com.stslex.wizard.feature.film.data.model -import com.stslex.core.database.sources.model.FilmEntity -import com.stslex.core.network.clients.film.model.FilmTrailerNetwork -import com.stslex.core.network.clients.film.model.MovieNetwork -import com.stslex.core.network.clients.film.model.TrailerSiteType +import com.stslex.wizard.core.database.sources.model.FilmEntity +import com.stslex.wizard.core.network.clients.film.model.FilmTrailerNetwork +import com.stslex.wizard.core.network.clients.film.model.MovieNetwork +import com.stslex.wizard.core.network.clients.film.model.TrailerSiteType fun MovieNetwork.toData( isFavourite: Boolean, diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepository.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepository.kt similarity index 63% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepository.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepository.kt index f7cf2eb3..b8aac8b4 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepository.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepository.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.film.data.repository +package com.stslex.wizard.feature.film.data.repository -import com.stslex.feature.film.data.model.FilmData +import com.stslex.wizard.feature.film.data.model.FilmData import kotlinx.coroutines.flow.Flow interface FilmRepository { diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepositoryImpl.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepositoryImpl.kt similarity index 77% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepositoryImpl.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepositoryImpl.kt index 06a8b18d..da03cc3b 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/data/repository/FilmRepositoryImpl.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/data/repository/FilmRepositoryImpl.kt @@ -1,12 +1,12 @@ -package com.stslex.feature.film.data.repository +package com.stslex.wizard.feature.film.data.repository -import com.stslex.core.database.sources.source.FavouriteFilmDataSource -import com.stslex.core.network.clients.film.client.FilmClient -import com.stslex.core.network.clients.profile.client.ProfileClient -import com.stslex.feature.film.data.model.FilmData -import com.stslex.feature.film.data.model.getTrailer -import com.stslex.feature.film.data.model.toData -import com.stslex.feature.film.data.model.toEntity +import com.stslex.wizard.core.database.sources.source.FavouriteFilmDataSource +import com.stslex.wizard.core.network.clients.film.client.FilmClient +import com.stslex.wizard.core.network.clients.profile.client.ProfileClient +import com.stslex.wizard.feature.film.data.model.FilmData +import com.stslex.wizard.feature.film.data.model.getTrailer +import com.stslex.wizard.feature.film.data.model.toData +import com.stslex.wizard.feature.film.data.model.toEntity import kotlinx.coroutines.async import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.flow.Flow diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/FilmModule.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/FilmModule.kt new file mode 100644 index 00000000..9c9da214 --- /dev/null +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/FilmModule.kt @@ -0,0 +1,32 @@ +package com.stslex.wizard.feature.film.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.film.data.repository.FilmRepository +import com.stslex.wizard.feature.film.data.repository.FilmRepositoryImpl +import com.stslex.wizard.feature.film.domain.interactor.FilmInteractor +import com.stslex.wizard.feature.film.domain.interactor.FilmInteractorImpl +import com.stslex.wizard.feature.film.navigation.FilmRouter +import com.stslex.wizard.feature.film.navigation.FilmRouterImpl +import com.stslex.wizard.feature.film.ui.store.FilmStore +import org.koin.dsl.module + +val featureFilmModule = module { + storeDefinition { + FilmStore( + interactor = get(), + appDispatcher = get(), + router = get(), + ) + } + factory { + FilmRouterImpl(navigator = get()) + } + factory { FilmInteractorImpl(repository = get()) } + factory { + FilmRepositoryImpl( + favouriteDatasource = get(), + client = get(), + profileClient = get() + ) + } +} \ No newline at end of file diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractor.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractor.kt similarity index 62% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractor.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractor.kt index f75e37fe..c154c2c9 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractor.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractor.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.film.domain.interactor +package com.stslex.wizard.feature.film.domain.interactor -import com.stslex.feature.film.domain.model.FilmDomain +import com.stslex.wizard.feature.film.domain.model.FilmDomain import kotlinx.coroutines.flow.Flow interface FilmInteractor { diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractorImpl.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractorImpl.kt similarity index 63% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractorImpl.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractorImpl.kt index 16808ea3..898d8db5 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/interactor/FilmInteractorImpl.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/interactor/FilmInteractorImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.film.domain.interactor +package com.stslex.wizard.feature.film.domain.interactor -import com.stslex.feature.film.data.repository.FilmRepository -import com.stslex.feature.film.domain.model.FilmDomain -import com.stslex.feature.film.domain.model.toData -import com.stslex.feature.film.domain.model.toDomain +import com.stslex.wizard.feature.film.data.repository.FilmRepository +import com.stslex.wizard.feature.film.domain.model.FilmDomain +import com.stslex.wizard.feature.film.domain.model.toData +import com.stslex.wizard.feature.film.domain.model.toDomain import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomain.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomain.kt similarity index 88% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomain.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomain.kt index 57bb977a..831cd37b 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomain.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.domain.model +package com.stslex.wizard.feature.film.domain.model data class FilmDomain( val id: String, diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomainMapper.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomainMapper.kt similarity index 87% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomainMapper.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomainMapper.kt index b9a307f7..7c908295 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/domain/model/FilmDomainMapper.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/domain/model/FilmDomainMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.film.domain.model +package com.stslex.wizard.feature.film.domain.model -import com.stslex.feature.film.data.model.FilmData +import com.stslex.wizard.feature.film.data.model.FilmData fun FilmData.toDomain() = FilmDomain( id = id, diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt new file mode 100644 index 00000000..e2142b8e --- /dev/null +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.film.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.Navigation + +interface FilmRouter : Router diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouterImpl.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouterImpl.kt similarity index 55% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouterImpl.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouterImpl.kt index 5b933b7d..a8a26cc2 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/navigation/FilmRouterImpl.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.film.navigation +package com.stslex.wizard.feature.film.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.film.ui.store.FilmStoreComponent +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent class FilmRouterImpl( private val navigator: AppNavigator diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/FilmScreen.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/FilmScreen.kt similarity index 82% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/FilmScreen.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/FilmScreen.kt index 17187021..e0f9b822 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/FilmScreen.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/FilmScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.ui +package com.stslex.wizard.feature.film.ui import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -13,13 +13,13 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.mvi.getStore -import com.stslex.core.ui.mvi.setupNavigator -import com.stslex.feature.film.ui.components.FilmContentScreen -import com.stslex.feature.film.ui.store.FilmScreenState -import com.stslex.feature.film.ui.store.FilmStore -import com.stslex.feature.film.ui.store.FilmStoreComponent.Action -import com.stslex.feature.film.ui.store.FilmStoreComponent.State +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.core.ui.mvi.setupNavigator +import com.stslex.wizard.feature.film.ui.components.FilmContentScreen +import com.stslex.wizard.feature.film.ui.store.FilmScreenState +import com.stslex.wizard.feature.film.ui.store.FilmStore +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.Action +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.State data class FilmScreen( val id: String diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/components/FilmContentScreen.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/components/FilmContentScreen.kt similarity index 95% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/components/FilmContentScreen.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/components/FilmContentScreen.kt index c758af42..42735840 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/components/FilmContentScreen.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/components/FilmContentScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.ui.components +package com.stslex.wizard.feature.film.ui.components import androidx.compose.animation.AnimatedContent import androidx.compose.foundation.background @@ -23,7 +23,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Favorite import androidx.compose.material.icons.filled.FavoriteBorder import androidx.compose.material.icons.filled.Place @@ -51,15 +51,15 @@ import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.dp -import com.stslex.core.ui.base.SwipeScrollConnection -import com.stslex.core.ui.base.SwipeState -import com.stslex.core.ui.base.image.NetworkImage -import com.stslex.core.ui.base.onClick -import com.stslex.core.ui.base.onClickDelay -import com.stslex.core.ui.theme.AppDimension -import com.stslex.core.ui.theme.toDp -import com.stslex.core.ui.theme.toPx -import com.stslex.feature.film.ui.model.Film +import com.stslex.wizard.core.ui.base.SwipeScrollConnection +import com.stslex.wizard.core.ui.base.SwipeState +import com.stslex.wizard.core.ui.base.image.NetworkImage +import com.stslex.wizard.core.ui.base.onClick +import com.stslex.wizard.core.ui.base.onClickDelay +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.toDp +import com.stslex.wizard.core.ui.theme.toPx +import com.stslex.wizard.feature.film.ui.model.Film @OptIn(ExperimentalMaterialApi::class) @Composable @@ -210,7 +210,7 @@ internal fun FilmToolbarNavButton( ) ) { Icon( - imageVector = Icons.Default.ArrowBack, + imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back", ) } diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/Film.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/Film.kt similarity index 91% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/Film.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/Film.kt index 5fa53b5a..2cb83185 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/Film.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/Film.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.ui.model +package com.stslex.wizard.feature.film.ui.model import androidx.compose.runtime.Stable import kotlinx.collections.immutable.ImmutableList diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/FilmMapper.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/FilmMapper.kt similarity index 88% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/FilmMapper.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/FilmMapper.kt index a71e6dfb..bbc47e75 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/model/FilmMapper.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/model/FilmMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.film.ui.model +package com.stslex.wizard.feature.film.ui.model -import com.stslex.feature.film.domain.model.FilmDomain +import com.stslex.wizard.feature.film.domain.model.FilmDomain import kotlinx.collections.immutable.toImmutableList fun FilmDomain.toUi() = Film( diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmArgument.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmArgument.kt similarity index 66% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmArgument.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmArgument.kt index 223cd9d5..d80c20f5 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmArgument.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmArgument.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film.ui.store +package com.stslex.wizard.feature.film.ui.store import androidx.compose.runtime.Stable diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmScreenState.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmScreenState.kt similarity index 72% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmScreenState.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmScreenState.kt index 32955d43..6a238536 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmScreenState.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmScreenState.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.film.ui.store +package com.stslex.wizard.feature.film.ui.store import androidx.compose.runtime.Stable -import com.stslex.feature.film.ui.model.Film +import com.stslex.wizard.feature.film.ui.model.Film @Stable sealed interface FilmScreenState { diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStore.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt similarity index 76% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStore.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt index a4d5ce61..4c7e4f59 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStore.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt @@ -1,15 +1,15 @@ -package com.stslex.feature.film.ui.store +package com.stslex.wizard.feature.film.ui.store -import com.stslex.core.core.AppDispatcher -import com.stslex.core.ui.mvi.Store -import com.stslex.feature.film.domain.interactor.FilmInteractor -import com.stslex.feature.film.navigation.FilmRouter -import com.stslex.feature.film.ui.model.toDomain -import com.stslex.feature.film.ui.model.toUi -import com.stslex.feature.film.ui.store.FilmStoreComponent.Action -import com.stslex.feature.film.ui.store.FilmStoreComponent.Event -import com.stslex.feature.film.ui.store.FilmStoreComponent.Navigation -import com.stslex.feature.film.ui.store.FilmStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.feature.film.domain.interactor.FilmInteractor +import com.stslex.wizard.feature.film.navigation.FilmRouter +import com.stslex.wizard.feature.film.ui.model.toDomain +import com.stslex.wizard.feature.film.ui.model.toUi +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.Action +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.Event +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.Navigation +import com.stslex.wizard.feature.film.ui.store.FilmStoreComponent.State import kotlinx.coroutines.Job class FilmStore( diff --git a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStoreComponent.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreComponent.kt similarity index 89% rename from feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStoreComponent.kt rename to feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreComponent.kt index ace47c8b..61102170 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/feature/film/ui/store/FilmStoreComponent.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreComponent.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.film.ui.store +package com.stslex.wizard.feature.film.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent interface FilmStoreComponent : StoreComponent { diff --git a/feature/film_feed/build.gradle.kts b/feature/film_feed/build.gradle.kts index 0a31941f..50b62557 100644 --- a/feature/film_feed/build.gradle.kts +++ b/feature/film_feed/build.gradle.kts @@ -1,64 +1,12 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = - project.file(project.rootProject.projectDir.path + "/iosApp/FeatureFilmFeedPodfile") - framework { - baseName = "featureFilmFeed" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.film_feed" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) } } -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepository.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepository.kt deleted file mode 100644 index d0db3fa5..00000000 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepository.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.stslex.feature.film_feed.data.repository - -import com.stslex.feature.film_feed.data.model.FeedDataModel - -interface FeedRepository { - - suspend fun getFeed(page: Int, pageSize: Int): FeedDataModel -} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/di/FeedModule.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/di/FeedModule.kt deleted file mode 100644 index c5b383ab..00000000 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/di/FeedModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.stslex.feature.film_feed.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.film_feed.data.repository.FeedRepository -import com.stslex.feature.film_feed.data.repository.FeedRepositoryImpl -import com.stslex.feature.film_feed.domain.interactor.FeedInteractor -import com.stslex.feature.film_feed.domain.interactor.FeedInteractorImpl -import com.stslex.feature.film_feed.navigation.FeedScreenRouter -import com.stslex.feature.film_feed.navigation.FeedScreenRouterImpl -import com.stslex.feature.film_feed.ui.store.FeedStore -import org.koin.dsl.module - -val featureFeedModule = module { - storeDefinition { - FeedStore( - interactor = get(), - appDispatcher = get(), - router = get() - ) - } - factory { FeedScreenRouterImpl(navigator = get()) } - factory { FeedInteractorImpl(repository = get()) } - factory { FeedRepositoryImpl(client = get()) } -} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractor.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractor.kt deleted file mode 100644 index e1ff86c2..00000000 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractor.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.stslex.feature.film_feed.domain.interactor - -import com.stslex.feature.film_feed.domain.model.FeedDomainModel - -interface FeedInteractor { - - suspend fun getFeed(page: Int, pageSize: Int): FeedDomainModel -} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouter.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouter.kt deleted file mode 100644 index e3469aea..00000000 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.film_feed.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Navigation - -interface FeedScreenRouter : Router diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataMapper.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataMapper.kt similarity index 56% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataMapper.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataMapper.kt index b1ee92b5..64280f02 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataMapper.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataMapper.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.film_feed.data.model +package com.stslex.wizard.feature.film_feed.data.model -import com.stslex.core.network.clients.film.model.FilmItemNetwork -import com.stslex.core.network.clients.film.model.FilmListNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmItemNetwork +import com.stslex.wizard.core.network.clients.film.model.FilmListNetwork fun FilmListNetwork.toData() = FeedDataModel( films = results.map { it.toData() }, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataModel.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataModel.kt similarity index 63% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataModel.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataModel.kt index e6e75ab4..95ab5a82 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FeedDataModel.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FeedDataModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.data.model +package com.stslex.wizard.feature.film_feed.data.model data class FeedDataModel( val films: List, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FilmDataModel.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FilmDataModel.kt similarity index 73% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FilmDataModel.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FilmDataModel.kt index bc799314..367762cc 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/model/FilmDataModel.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/model/FilmDataModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.data.model +package com.stslex.wizard.feature.film_feed.data.model data class FilmDataModel( val id: String, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepository.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepository.kt new file mode 100644 index 00000000..762da7e7 --- /dev/null +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepository.kt @@ -0,0 +1,8 @@ +package com.stslex.wizard.feature.film_feed.data.repository + +import com.stslex.wizard.feature.film_feed.data.model.FeedDataModel + +interface FeedRepository { + + suspend fun getFeed(page: Int, pageSize: Int): FeedDataModel +} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepositoryImpl.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepositoryImpl.kt similarity index 53% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepositoryImpl.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepositoryImpl.kt index 6e7ca726..41fa7938 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/data/repository/FeedRepositoryImpl.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/data/repository/FeedRepositoryImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.film_feed.data.repository +package com.stslex.wizard.feature.film_feed.data.repository -import com.stslex.core.network.clients.film.client.FilmClient -import com.stslex.feature.film_feed.data.model.FeedDataModel -import com.stslex.feature.film_feed.data.model.toData +import com.stslex.wizard.core.network.clients.film.client.FilmClient +import com.stslex.wizard.feature.film_feed.data.model.FeedDataModel +import com.stslex.wizard.feature.film_feed.data.model.toData class FeedRepositoryImpl( private val client: FilmClient diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/FeedModule.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/FeedModule.kt new file mode 100644 index 00000000..a14b7eb1 --- /dev/null +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/FeedModule.kt @@ -0,0 +1,28 @@ +package com.stslex.wizard.feature.film_feed.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.film_feed.data.repository.FeedRepository +import com.stslex.wizard.feature.film_feed.data.repository.FeedRepositoryImpl +import com.stslex.wizard.feature.film_feed.domain.interactor.FeedInteractor +import com.stslex.wizard.feature.film_feed.domain.interactor.FeedInteractorImpl +import com.stslex.wizard.feature.film_feed.navigation.FeedScreenRouter +import com.stslex.wizard.feature.film_feed.navigation.FeedScreenRouterImpl +import com.stslex.wizard.feature.film_feed.ui.store.FeedStore +import org.koin.dsl.module + +val featureFeedModule = module { + storeDefinition { + FeedStore( + interactor = get(), + appDispatcher = get(), + router = get() + ) + } + factory { FeedScreenRouterImpl(navigator = get()) } + factory { FeedInteractorImpl(repository = get()) } + factory { + FeedRepositoryImpl( + client = get() + ) + } +} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractor.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractor.kt new file mode 100644 index 00000000..20055302 --- /dev/null +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractor.kt @@ -0,0 +1,8 @@ +package com.stslex.wizard.feature.film_feed.domain.interactor + +import com.stslex.wizard.feature.film_feed.domain.model.FeedDomainModel + +interface FeedInteractor { + + suspend fun getFeed(page: Int, pageSize: Int): FeedDomainModel +} diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractorImpl.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractorImpl.kt similarity index 52% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractorImpl.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractorImpl.kt index 58713587..c7a85282 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/interactor/FeedInteractorImpl.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/interactor/FeedInteractorImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.film_feed.domain.interactor +package com.stslex.wizard.feature.film_feed.domain.interactor -import com.stslex.feature.film_feed.data.repository.FeedRepository -import com.stslex.feature.film_feed.domain.model.FeedDomainModel -import com.stslex.feature.film_feed.domain.model.toDomain +import com.stslex.wizard.feature.film_feed.data.repository.FeedRepository +import com.stslex.wizard.feature.film_feed.domain.model.FeedDomainModel +import com.stslex.wizard.feature.film_feed.domain.model.toDomain class FeedInteractorImpl( private val repository: FeedRepository diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainMapper.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainMapper.kt similarity index 58% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainMapper.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainMapper.kt index 3697fd8c..8470a3b3 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainMapper.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainMapper.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.film_feed.domain.model +package com.stslex.wizard.feature.film_feed.domain.model -import com.stslex.feature.film_feed.data.model.FeedDataModel -import com.stslex.feature.film_feed.data.model.FilmDataModel +import com.stslex.wizard.feature.film_feed.data.model.FeedDataModel +import com.stslex.wizard.feature.film_feed.data.model.FilmDataModel fun FeedDataModel.toDomain() = FeedDomainModel( films = films.map { it.toDomain() }, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainModel.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainModel.kt similarity index 63% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainModel.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainModel.kt index 785dd472..beb7e17b 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FeedDomainModel.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FeedDomainModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.domain.model +package com.stslex.wizard.feature.film_feed.domain.model data class FeedDomainModel( val films: List, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FilmDomainModel.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FilmDomainModel.kt similarity index 72% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FilmDomainModel.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FilmDomainModel.kt index 2f4fa297..5c047a61 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/domain/model/FilmDomainModel.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/domain/model/FilmDomainModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.domain.model +package com.stslex.wizard.feature.film_feed.domain.model data class FilmDomainModel( val id: String, diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt new file mode 100644 index 00000000..d86a7690 --- /dev/null +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.film_feed.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Navigation + +interface FeedScreenRouter : Router diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouterImpl.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouterImpl.kt similarity index 63% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouterImpl.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouterImpl.kt index 64246e8c..e2a670a9 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/navigation/FeedScreenRouterImpl.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.film_feed.navigation +package com.stslex.wizard.feature.film_feed.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent class FeedScreenRouterImpl( private val navigator: AppNavigator diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/FeedScreen.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/FeedScreen.kt similarity index 72% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/FeedScreen.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/FeedScreen.kt index 10576e45..f22d2c9f 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/FeedScreen.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/FeedScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui +package com.stslex.wizard.feature.film_feed.ui import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -9,15 +9,15 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.mvi.getStore -import com.stslex.feature.film_feed.ui.components.FeedScreenContent -import com.stslex.feature.film_feed.ui.components.FeedScreenError -import com.stslex.feature.film_feed.ui.components.FeedScreenLoading -import com.stslex.feature.film_feed.ui.model.ScreenState -import com.stslex.feature.film_feed.ui.store.FeedStore -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Action -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Event -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.State +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.feature.film_feed.ui.components.FeedScreenContent +import com.stslex.wizard.feature.film_feed.ui.components.FeedScreenError +import com.stslex.wizard.feature.film_feed.ui.components.FeedScreenLoading +import com.stslex.wizard.feature.film_feed.ui.model.ScreenState +import com.stslex.wizard.feature.film_feed.ui.store.FeedStore +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Action +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Event +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.State object FeedScreen : Screen { diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenContent.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenContent.kt similarity index 94% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenContent.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenContent.kt index f40f3757..d1ecb29b 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenContent.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenContent.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.components +package com.stslex.wizard.feature.film_feed.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxWithConstraints @@ -12,8 +12,8 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.remember import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier -import com.stslex.feature.film_feed.ui.model.FilmModel -import com.stslex.feature.film_feed.ui.model.ScreenState +import com.stslex.wizard.feature.film_feed.ui.model.FilmModel +import com.stslex.wizard.feature.film_feed.ui.model.ScreenState import kotlinx.collections.immutable.ImmutableList import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.distinctUntilChanged diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenError.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenError.kt similarity index 88% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenError.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenError.kt index 91a8571e..0a039728 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenError.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenError.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.components +package com.stslex.wizard.feature.film_feed.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.material3.Text diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenFilmItem.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenFilmItem.kt similarity index 94% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenFilmItem.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenFilmItem.kt index e52c9653..99c4f026 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenFilmItem.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenFilmItem.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.components +package com.stslex.wizard.feature.film_feed.ui.components import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -23,10 +23,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.unit.Dp -import com.stslex.core.ui.base.image.NetworkImage -import com.stslex.core.ui.base.onClickDelay -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.film_feed.ui.model.FilmModel +import com.stslex.wizard.core.ui.base.image.NetworkImage +import com.stslex.wizard.core.ui.base.onClickDelay +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.film_feed.ui.model.FilmModel import kotlinx.collections.immutable.ImmutableList @Composable diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenLoading.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenLoading.kt similarity index 90% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenLoading.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenLoading.kt index 38231c95..90e927ce 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/components/FeedScreenLoading.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/components/FeedScreenLoading.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.components +package com.stslex.wizard.feature.film_feed.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmMapper.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmMapper.kt similarity index 69% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmMapper.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmMapper.kt index a5bbfae1..8e7e3407 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmMapper.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.film_feed.ui.model +package com.stslex.wizard.feature.film_feed.ui.model -import com.stslex.feature.film_feed.domain.model.FilmDomainModel +import com.stslex.wizard.feature.film_feed.domain.model.FilmDomainModel import kotlinx.collections.immutable.toImmutableList fun List.toUI() = map { it.toUi() }.toImmutableList() diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmModel.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmModel.kt similarity index 82% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmModel.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmModel.kt index 4f23323c..5a821e24 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/FilmModel.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/FilmModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.model +package com.stslex.wizard.feature.film_feed.ui.model import androidx.compose.runtime.Stable import kotlinx.collections.immutable.ImmutableList diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/ScreenState.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/ScreenState.kt similarity index 87% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/ScreenState.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/ScreenState.kt index b466cd8c..a5d456dd 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/model/ScreenState.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/model/ScreenState.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.film_feed.ui.model +package com.stslex.wizard.feature.film_feed.ui.model import androidx.compose.runtime.Stable diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStore.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt similarity index 78% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStore.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt index 5ec7eafc..385694aa 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStore.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt @@ -1,17 +1,17 @@ -package com.stslex.feature.film_feed.ui.store +package com.stslex.wizard.feature.film_feed.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.core.AppDispatcher -import com.stslex.core.core.Logger -import com.stslex.core.ui.mvi.Store -import com.stslex.feature.film_feed.domain.interactor.FeedInteractor -import com.stslex.feature.film_feed.navigation.FeedScreenRouter -import com.stslex.feature.film_feed.ui.model.ScreenState -import com.stslex.feature.film_feed.ui.model.toUI -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Action -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Event -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.Navigation -import com.stslex.feature.film_feed.ui.store.FeedStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.feature.film_feed.domain.interactor.FeedInteractor +import com.stslex.wizard.feature.film_feed.navigation.FeedScreenRouter +import com.stslex.wizard.feature.film_feed.ui.model.ScreenState +import com.stslex.wizard.feature.film_feed.ui.model.toUI +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Action +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Event +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.Navigation +import com.stslex.wizard.feature.film_feed.ui.store.FeedStoreComponent.State import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.Job diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStoreComponent.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreComponent.kt similarity index 82% rename from feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStoreComponent.kt rename to feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreComponent.kt index f8d131ef..90b35f52 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/feature/film_feed/ui/store/FeedStoreComponent.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreComponent.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.film_feed.ui.store +package com.stslex.wizard.feature.film_feed.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.feature.film_feed.ui.model.FilmModel -import com.stslex.feature.film_feed.ui.model.ScreenState +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.feature.film_feed.ui.model.FilmModel +import com.stslex.wizard.feature.film_feed.ui.model.ScreenState import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/feature/follower/build.gradle.kts b/feature/follower/build.gradle.kts index 33d3484e..807fe38e 100644 --- a/feature/follower/build.gradle.kts +++ b/feature/follower/build.gradle.kts @@ -1,64 +1,11 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = - project.file(project.rootProject.projectDir.path + "/iosApp/FeatureFollowerPodfile") - framework { - baseName = "featureFollower" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.follower" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) } \ No newline at end of file diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/di/FollowerModule.kt b/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/di/FollowerModule.kt deleted file mode 100644 index ad2bd08c..00000000 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/di/FollowerModule.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.stslex.feature.follower.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.follower.data.repository.FollowerRepository -import com.stslex.feature.follower.data.repository.FollowerRepositoryImpl -import com.stslex.feature.follower.domain.interactor.FollowerInteractor -import com.stslex.feature.follower.domain.interactor.FollowerInteractorImpl -import com.stslex.feature.follower.navigation.FollowerRouter -import com.stslex.feature.follower.navigation.FollowerRouterImpl -import com.stslex.feature.follower.ui.store.FollowerStore -import org.koin.dsl.module - -val featureFollowerModule = module { - factory { FollowerRepositoryImpl(client = get()) } - factory { FollowerInteractorImpl(repository = get()) } - factory { FollowerRouterImpl(navigator = get()) } - storeDefinition { - FollowerStore( - interactor = get(), - appDispatcher = get(), - router = get(), - pagerFactory = get(), - ) - } -} \ No newline at end of file diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouter.kt b/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouter.kt deleted file mode 100644 index 48d0f9c2..00000000 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.stslex.feature.follower.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.Navigation - -interface FollowerRouter : Router - diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataMapper.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataMapper.kt similarity index 55% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataMapper.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataMapper.kt index 1bf19ad8..abf57d3e 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataMapper.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.follower.data.model +package com.stslex.wizard.feature.follower.data.model -import com.stslex.core.network.clients.profile.model.response.UserFollowerResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserFollowerResponse fun UserFollowerResponse.toData(): FollowerDataModel = FollowerDataModel( uuid = uuid, diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataModel.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataModel.kt similarity index 59% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataModel.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataModel.kt index 6741ee44..dce21cc1 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/model/FollowerDataModel.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/model/FollowerDataModel.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.follower.data.model +package com.stslex.wizard.feature.follower.data.model -import com.stslex.core.core.paging.PagingCoreItem +import com.stslex.wizard.core.core.paging.PagingCoreItem data class FollowerDataModel( override val uuid: String, diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepository.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepository.kt similarity index 65% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepository.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepository.kt index 50c0ab68..e727cb95 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepository.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepository.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.follower.data.repository +package com.stslex.wizard.feature.follower.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.follower.data.model.FollowerDataModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.follower.data.model.FollowerDataModel interface FollowerRepository { diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepositoryImpl.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepositoryImpl.kt similarity index 66% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepositoryImpl.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepositoryImpl.kt index e230c95f..efdcbe21 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/data/repository/FollowerRepositoryImpl.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/data/repository/FollowerRepositoryImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.follower.data.repository +package com.stslex.wizard.feature.follower.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.core.paging.pagingMap -import com.stslex.core.network.clients.profile.client.ProfileClient -import com.stslex.core.network.clients.profile.model.request.PagingProfileRequest -import com.stslex.feature.follower.data.model.FollowerDataModel -import com.stslex.feature.follower.data.model.toData +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.pagingMap +import com.stslex.wizard.core.network.clients.profile.client.ProfileClient +import com.stslex.wizard.core.network.clients.profile.model.request.PagingProfileRequest +import com.stslex.wizard.feature.follower.data.model.FollowerDataModel +import com.stslex.wizard.feature.follower.data.model.toData class FollowerRepositoryImpl( private val client: ProfileClient diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/FollowerModule.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/FollowerModule.kt new file mode 100644 index 00000000..2b8f61db --- /dev/null +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/FollowerModule.kt @@ -0,0 +1,25 @@ +package com.stslex.wizard.feature.follower.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.follower.data.repository.FollowerRepository +import com.stslex.wizard.feature.follower.data.repository.FollowerRepositoryImpl +import com.stslex.wizard.feature.follower.domain.interactor.FollowerInteractor +import com.stslex.wizard.feature.follower.domain.interactor.FollowerInteractorImpl +import com.stslex.wizard.feature.follower.navigation.FollowerRouter +import com.stslex.wizard.feature.follower.navigation.FollowerRouterImpl +import com.stslex.wizard.feature.follower.ui.store.FollowerStore +import org.koin.dsl.module + +val featureFollowerModule = module { + factory { FollowerRepositoryImpl(client = get()) } + factory { FollowerInteractorImpl(repository = get()) } + factory { FollowerRouterImpl(navigator = get()) } + storeDefinition { + FollowerStore( + interactor = get(), + appDispatcher = get(), + router = get(), + pagerFactory = get(), + ) + } +} \ No newline at end of file diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractor.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractor.kt similarity index 65% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractor.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractor.kt index bcedf99e..abdbc2d3 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractor.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractor.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.follower.domain.interactor +package com.stslex.wizard.feature.follower.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.follower.data.model.FollowerDataModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.follower.data.model.FollowerDataModel interface FollowerInteractor { diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractorImpl.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractorImpl.kt similarity index 73% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractorImpl.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractorImpl.kt index 0f8fb2fa..7adc574a 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/domain/interactor/FollowerInteractorImpl.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/domain/interactor/FollowerInteractorImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.follower.domain.interactor +package com.stslex.wizard.feature.follower.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.follower.data.model.FollowerDataModel -import com.stslex.feature.follower.data.repository.FollowerRepository +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.follower.data.model.FollowerDataModel +import com.stslex.wizard.feature.follower.data.repository.FollowerRepository class FollowerInteractorImpl( private val repository: FollowerRepository, diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt new file mode 100644 index 00000000..d7bb8293 --- /dev/null +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt @@ -0,0 +1,7 @@ +package com.stslex.wizard.feature.follower.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.Navigation + +interface FollowerRouter : Router + diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouterImpl.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouterImpl.kt similarity index 52% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouterImpl.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouterImpl.kt index ff9b04d0..211b8130 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerRouterImpl.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouterImpl.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.follower.navigation +package com.stslex.wizard.feature.follower.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.feature.follower.ui.store.FollowerStoreComponent +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent class FollowerRouterImpl( private val navigator: AppNavigator diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerScreenArgs.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerScreenArgs.kt similarity index 82% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerScreenArgs.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerScreenArgs.kt index f9099d41..88822bd6 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/navigation/FollowerScreenArgs.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerScreenArgs.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.follower.navigation +package com.stslex.wizard.feature.follower.navigation sealed class FollowerScreenArgs( open val uuid: String diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/FollowerScreen.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/FollowerScreen.kt similarity index 80% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/FollowerScreen.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/FollowerScreen.kt index a42a869a..182501ea 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/FollowerScreen.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/FollowerScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.follower.ui +package com.stslex.wizard.feature.follower.ui import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -11,13 +11,13 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.base.paging.PagingColumn -import com.stslex.core.ui.mvi.getStore -import com.stslex.feature.follower.navigation.FollowerScreenArgs -import com.stslex.feature.follower.ui.store.FollowerScreenState -import com.stslex.feature.follower.ui.store.FollowerStore -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.Action -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.State +import com.stslex.wizard.core.ui.base.paging.PagingColumn +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.feature.follower.navigation.FollowerScreenArgs +import com.stslex.wizard.feature.follower.ui.store.FollowerScreenState +import com.stslex.wizard.feature.follower.ui.store.FollowerStore +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.Action +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.State data class FollowerScreen( val args: FollowerScreenArgs diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerModel.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerModel.kt similarity index 65% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerModel.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerModel.kt index d356938c..53bb091a 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerModel.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerModel.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.follower.ui.model +package com.stslex.wizard.feature.follower.ui.model import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingItem @Stable data class FollowerModel( diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerUiMapper.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerUiMapper.kt similarity index 56% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerUiMapper.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerUiMapper.kt index fddc1322..a5adc7c0 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/model/FollowerUiMapper.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/model/FollowerUiMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.follower.ui.model +package com.stslex.wizard.feature.follower.ui.model -import com.stslex.feature.follower.data.model.FollowerDataModel +import com.stslex.wizard.feature.follower.data.model.FollowerDataModel fun FollowerDataModel.toUi(): FollowerModel = FollowerModel( uuid = uuid, diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerScreenState.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerScreenState.kt similarity index 86% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerScreenState.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerScreenState.kt index 55293f28..b85d7063 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerScreenState.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerScreenState.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.follower.ui.store +package com.stslex.wizard.feature.follower.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.AppError -import com.stslex.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.core.ui.base.AppError +import com.stslex.wizard.core.ui.pager.states.PagerLoadState @Stable sealed interface FollowerScreenState { diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStore.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt similarity index 76% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStore.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt index 07066d14..e2582dfc 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStore.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt @@ -1,22 +1,22 @@ -package com.stslex.feature.follower.ui.store - -import com.stslex.core.core.AppDispatcher -import com.stslex.core.ui.base.mapToAppError -import com.stslex.core.ui.base.paging.toUi -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.core.ui.pager.pager.StorePager -import com.stslex.core.ui.pager.pager.StorePagerFactory -import com.stslex.core.ui.pager.states.PagerLoadState -import com.stslex.feature.follower.domain.interactor.FollowerInteractor -import com.stslex.feature.follower.navigation.FollowerRouter -import com.stslex.feature.follower.navigation.FollowerScreenArgs -import com.stslex.feature.follower.ui.model.FollowerModel -import com.stslex.feature.follower.ui.model.toUi -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.Action -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.Event -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.Navigation -import com.stslex.feature.follower.ui.store.FollowerStoreComponent.State +package com.stslex.wizard.feature.follower.ui.store + +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.ui.base.mapToAppError +import com.stslex.wizard.core.ui.base.paging.toUi +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.core.ui.pager.pager.StorePager +import com.stslex.wizard.core.ui.pager.pager.StorePagerFactory +import com.stslex.wizard.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.feature.follower.domain.interactor.FollowerInteractor +import com.stslex.wizard.feature.follower.navigation.FollowerRouter +import com.stslex.wizard.feature.follower.navigation.FollowerScreenArgs +import com.stslex.wizard.feature.follower.ui.model.FollowerModel +import com.stslex.wizard.feature.follower.ui.model.toUi +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.Action +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.Event +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.Navigation +import com.stslex.wizard.feature.follower.ui.store.FollowerStoreComponent.State import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map diff --git a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStoreComponent.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreComponent.kt similarity index 75% rename from feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStoreComponent.kt rename to feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreComponent.kt index e86a14f0..bed292ce 100644 --- a/feature/follower/src/commonMain/kotlin/com.stslex.feature.follower/ui/store/FollowerStoreComponent.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreComponent.kt @@ -1,12 +1,12 @@ -package com.stslex.feature.follower.ui.store +package com.stslex.wizard.feature.follower.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingUiState -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.follower.navigation.FollowerScreenArgs -import com.stslex.feature.follower.ui.model.FollowerModel +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingUiState +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.follower.navigation.FollowerScreenArgs +import com.stslex.wizard.feature.follower.ui.model.FollowerModel interface FollowerStoreComponent : StoreComponent { diff --git a/feature/match/build.gradle.kts b/feature/match/build.gradle.kts index 131c76a5..960a0305 100644 --- a/feature/match/build.gradle.kts +++ b/feature/match/build.gradle.kts @@ -1,64 +1,12 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) + implementation(project(":core:database")) } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/FeatureMatchPodfile") - framework { - baseName = "featureMatch" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - implementation(project(":core:database")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.match" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) } \ No newline at end of file diff --git a/feature/match/consumer-rules.pro b/feature/match/consumer-rules.pro deleted file mode 100644 index e69de29b..00000000 diff --git a/feature/match/proguard-rules.pro b/feature/match/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/feature/match/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouter.kt b/feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouter.kt deleted file mode 100644 index ef65b251..00000000 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.match.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.match.ui.store.MatchStoreComponent.Navigation - -interface MatchRouter : Router \ No newline at end of file diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataMapper.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataMapper.kt similarity index 71% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataMapper.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataMapper.kt index 6f026b7d..5faedfa7 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataMapper.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataMapper.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.match.data.model +package com.stslex.wizard.feature.match.data.model -import com.stslex.core.core.asyncMap -import com.stslex.core.network.clients.match.model.response.MatchResponse -import com.stslex.core.network.clients.match.model.response.MatchStatusResponse -import com.stslex.core.network.clients.match.model.response.MatchUserResponse +import com.stslex.wizard.core.core.asyncMap +import com.stslex.wizard.core.network.clients.match.model.response.MatchResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchStatusResponse +import com.stslex.wizard.core.network.clients.match.model.response.MatchUserResponse internal suspend fun MatchResponse.toData( userUUID: String diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataModel.kt similarity index 71% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataModel.kt index f199d506..872b2007 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataModel.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.match.data.model +package com.stslex.wizard.feature.match.data.model -import com.stslex.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingItem data class MatchDataModel( override val uuid: String, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataStatusModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataStatusModel.kt similarity index 66% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataStatusModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataStatusModel.kt index d918722c..670c5ca8 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchDataStatusModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchDataStatusModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.data.model +package com.stslex.wizard.feature.match.data.model enum class MatchDataStatusModel { PENDING, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchUserDataModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchUserDataModel.kt similarity index 76% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchUserDataModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchUserDataModel.kt index bdd1f6d2..85bb01ac 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/model/MatchUserDataModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/model/MatchUserDataModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.data.model +package com.stslex.wizard.feature.match.data.model data class MatchUserDataModel( val uuid: String, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepository.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepository.kt similarity index 50% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepository.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepository.kt index 05bddf52..faf3cbb7 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepository.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepository.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.match.data.repository +package com.stslex.wizard.feature.match.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.match.data.model.MatchDataModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.match.data.model.MatchDataModel interface MatchRepository { diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepositoryImpl.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepositoryImpl.kt similarity index 55% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepositoryImpl.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepositoryImpl.kt index 7bcf919f..f10746ec 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/data/repository/MatchRepositoryImpl.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/data/repository/MatchRepositoryImpl.kt @@ -1,12 +1,12 @@ -package com.stslex.feature.match.data.repository +package com.stslex.wizard.feature.match.data.repository -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.core.paging.pagingMap -import com.stslex.core.database.store.UserStore -import com.stslex.core.network.clients.match.client.MatchClient -import com.stslex.core.network.model.PagingRequest -import com.stslex.feature.match.data.model.MatchDataModel -import com.stslex.feature.match.data.model.toData +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.pagingMap +import com.stslex.wizard.core.database.store.UserStore +import com.stslex.wizard.core.network.clients.match.client.MatchClient +import com.stslex.wizard.core.network.model.PagingRequest +import com.stslex.wizard.feature.match.data.model.MatchDataModel +import com.stslex.wizard.feature.match.data.model.toData class MatchRepositoryImpl( private val client: MatchClient, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/di/MatchModule.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/MatchModule.kt similarity index 51% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/di/MatchModule.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/MatchModule.kt index 03caa1cd..48f7dde5 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/di/MatchModule.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/MatchModule.kt @@ -1,13 +1,13 @@ -package com.stslex.feature.match.di +package com.stslex.wizard.feature.match.di -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.match.data.repository.MatchRepository -import com.stslex.feature.match.data.repository.MatchRepositoryImpl -import com.stslex.feature.match.domain.interactor.MatchInteractor -import com.stslex.feature.match.domain.interactor.MatchInteractorImpl -import com.stslex.feature.match.navigation.MatchRouter -import com.stslex.feature.match.navigation.MatchRouterImpl -import com.stslex.feature.match.ui.store.MatchStore +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.match.data.repository.MatchRepository +import com.stslex.wizard.feature.match.data.repository.MatchRepositoryImpl +import com.stslex.wizard.feature.match.domain.interactor.MatchInteractor +import com.stslex.wizard.feature.match.domain.interactor.MatchInteractorImpl +import com.stslex.wizard.feature.match.navigation.MatchRouter +import com.stslex.wizard.feature.match.navigation.MatchRouterImpl +import com.stslex.wizard.feature.match.ui.store.MatchStore import org.koin.dsl.module val featureMatchModule = module { diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractor.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractor.kt similarity index 53% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractor.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractor.kt index b1931e5e..de2332ef 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractor.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractor.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.match.domain.interactor +package com.stslex.wizard.feature.match.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.feature.match.domain.model.MatchDomainModel +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.feature.match.domain.model.MatchDomainModel interface MatchInteractor { diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractorImpl.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractorImpl.kt similarity index 57% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractorImpl.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractorImpl.kt index c3fe2856..fb3b5d28 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/interactor/MatchInteractorImpl.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/interactor/MatchInteractorImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.match.domain.interactor +package com.stslex.wizard.feature.match.domain.interactor -import com.stslex.core.core.paging.PagingResponse -import com.stslex.core.core.paging.pagingMap -import com.stslex.core.network.utils.token.AuthController -import com.stslex.feature.match.data.repository.MatchRepository -import com.stslex.feature.match.domain.model.MatchDomainModel -import com.stslex.feature.match.domain.model.toDomain +import com.stslex.wizard.core.core.paging.PagingResponse +import com.stslex.wizard.core.core.paging.pagingMap +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.feature.match.data.repository.MatchRepository +import com.stslex.wizard.feature.match.domain.model.MatchDomainModel +import com.stslex.wizard.feature.match.domain.model.toDomain class MatchInteractorImpl( private val repository: MatchRepository, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainMapper.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainMapper.kt similarity index 50% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainMapper.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainMapper.kt index ef485d6f..3d9d19c5 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainMapper.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainMapper.kt @@ -1,22 +1,23 @@ -package com.stslex.feature.match.domain.model - -import com.stslex.core.core.asyncMap -import com.stslex.feature.match.data.model.MatchDataModel -import com.stslex.feature.match.data.model.MatchDataStatusModel -import com.stslex.feature.match.data.model.MatchUserDataModel - -suspend fun MatchDataModel.toDomain() = MatchDomainModel( - uuid = uuid, - title = title, - description = description, - status = status.toDomain(), - participants = participants.asyncMap { it.toDomain() }, - isCreator = isCreator, - expiresAtDays = expiresAt.toDays(), - expiresAtHours = expiresAt.toHours(), - expiresAtMinutes = expiresAt.toMinutes(), - expiresAtSeconds = expiresAt.toSeconds(), -) +package com.stslex.wizard.feature.match.domain.model + +import com.stslex.wizard.core.core.asyncMap +import com.stslex.wizard.feature.match.data.model.MatchDataModel +import com.stslex.wizard.feature.match.data.model.MatchDataStatusModel +import com.stslex.wizard.feature.match.data.model.MatchUserDataModel + +suspend fun MatchDataModel.toDomain() = + com.stslex.wizard.feature.match.domain.model.MatchDomainModel( + uuid = uuid, + title = title, + description = description, + status = status.toDomain(), + participants = participants.asyncMap { it.toDomain() }, + isCreator = isCreator, + expiresAtDays = expiresAt.toDays(), + expiresAtHours = expiresAt.toHours(), + expiresAtMinutes = expiresAt.toMinutes(), + expiresAtSeconds = expiresAt.toSeconds(), + ) private fun Long.toDays() = (this / (24 * 60 * 60)).toInt() diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainModel.kt similarity index 76% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainModel.kt index aa1535f5..88ec404f 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainModel.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.match.domain.model +package com.stslex.wizard.feature.match.domain.model -import com.stslex.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingItem data class MatchDomainModel( override val uuid: String, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainStatus.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainStatus.kt similarity index 65% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainStatus.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainStatus.kt index d7b760ed..39b76cef 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchDomainStatus.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchDomainStatus.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.domain.model +package com.stslex.wizard.feature.match.domain.model enum class MatchDomainStatus { PENDING, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchUserDomainModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchUserDomainModel.kt similarity index 75% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchUserDomainModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchUserDomainModel.kt index 70cb67b7..fd225925 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/domain/model/MatchUserDomainModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/domain/model/MatchUserDomainModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.domain.model +package com.stslex.wizard.feature.match.domain.model data class MatchUserDomainModel( val uuid: String, diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt new file mode 100644 index 00000000..fdc58713 --- /dev/null +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.match.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Navigation + +interface MatchRouter : Router \ No newline at end of file diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouterImpl.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouterImpl.kt similarity index 65% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouterImpl.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouterImpl.kt index f6940252..b5cea466 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/navigation/MatchRouterImpl.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.match.navigation +package com.stslex.wizard.feature.match.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.match.ui.store.MatchStoreComponent.Navigation +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Navigation class MatchRouterImpl( private val navigator: AppNavigator diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/MatchScreen.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/MatchScreen.kt similarity index 74% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/MatchScreen.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/MatchScreen.kt index 1ec40d08..e770ec8f 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/MatchScreen.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/MatchScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui +package com.stslex.wizard.feature.match.ui import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.fillMaxSize @@ -10,18 +10,18 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.components.AppSnackbarHost -import com.stslex.core.ui.mvi.getStore -import com.stslex.core.ui.navigation.args.MatchScreenArgs -import com.stslex.feature.match.ui.components.MatchScreenContent -import com.stslex.feature.match.ui.components.MatchScreenEmpty -import com.stslex.feature.match.ui.components.MatchScreenError -import com.stslex.feature.match.ui.components.MatchScreenShimmer -import com.stslex.feature.match.ui.store.MatchScreenState -import com.stslex.feature.match.ui.store.MatchStore -import com.stslex.feature.match.ui.store.MatchStoreComponent.Action -import com.stslex.feature.match.ui.store.MatchStoreComponent.Event -import com.stslex.feature.match.ui.store.MatchStoreComponent.State +import com.stslex.wizard.core.ui.components.AppSnackbarHost +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.core.ui.navigation.args.MatchScreenArgs +import com.stslex.wizard.feature.match.ui.components.MatchScreenContent +import com.stslex.wizard.feature.match.ui.components.MatchScreenEmpty +import com.stslex.wizard.feature.match.ui.components.MatchScreenError +import com.stslex.wizard.feature.match.ui.components.MatchScreenShimmer +import com.stslex.wizard.feature.match.ui.store.MatchScreenState +import com.stslex.wizard.feature.match.ui.store.MatchStore +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Action +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Event +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.State data class MatchScreen( private val args: MatchScreenArgs diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenContent.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenContent.kt similarity index 87% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenContent.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenContent.kt index cfeb26a0..5bd2d023 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenContent.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenContent.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.components +package com.stslex.wizard.feature.match.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -17,13 +17,13 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.core.ui.base.paging.PagingColumn -import com.stslex.core.ui.base.paging.PagingUiState -import com.stslex.core.ui.base.shimmerLoadingAnimation -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.match.ui.model.MatchUiModel -import com.stslex.feature.match.ui.store.MatchScreenState -import com.stslex.feature.match.ui.store.MatchStoreComponent.Action +import com.stslex.wizard.core.ui.base.paging.PagingColumn +import com.stslex.wizard.core.ui.base.paging.PagingUiState +import com.stslex.wizard.core.ui.base.shimmerLoadingAnimation +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.match.ui.model.MatchUiModel +import com.stslex.wizard.feature.match.ui.store.MatchScreenState +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Action @OptIn(ExperimentalMaterialApi::class) @Composable diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenEmpty.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenEmpty.kt similarity index 89% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenEmpty.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenEmpty.kt index 1ace8c09..daf5c26d 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenEmpty.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenEmpty.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.components +package com.stslex.wizard.feature.match.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenError.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenError.kt similarity index 92% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenError.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenError.kt index e65a2acc..b4e47819 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenError.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenError.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.components +package com.stslex.wizard.feature.match.ui.components import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -11,8 +11,8 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.core.ui.base.AppError -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.base.AppError +import com.stslex.wizard.core.ui.theme.AppDimension @Composable internal fun MatchScreenError( diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenShimmer.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenShimmer.kt similarity index 88% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenShimmer.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenShimmer.kt index 1dc6c250..15b25936 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/components/MatchScreenShimmer.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/components/MatchScreenShimmer.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.components +package com.stslex.wizard.feature.match.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -7,7 +7,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.feature.match.ui.model.MatchUiModel +import com.stslex.wizard.feature.match.ui.model.MatchUiModel @Composable internal fun MatchScreenShimmer( diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchDataMapper.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchDataMapper.kt similarity index 54% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchDataMapper.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchDataMapper.kt index ee42da2d..eb62b74e 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchDataMapper.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchDataMapper.kt @@ -1,26 +1,27 @@ -package com.stslex.feature.match.ui.model +package com.stslex.wizard.feature.match.ui.model -import com.stslex.core.core.asyncMap -import com.stslex.core.ui.pager.states.PagerLoadState -import com.stslex.feature.match.domain.model.MatchDomainModel -import com.stslex.feature.match.domain.model.MatchDomainStatus -import com.stslex.feature.match.domain.model.MatchUserDomainModel -import com.stslex.feature.match.ui.store.MatchScreenState +import com.stslex.wizard.core.core.asyncMap +import com.stslex.wizard.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.feature.match.domain.model.MatchDomainModel +import com.stslex.wizard.feature.match.domain.model.MatchDomainStatus +import com.stslex.wizard.feature.match.domain.model.MatchUserDomainModel +import com.stslex.wizard.feature.match.ui.store.MatchScreenState import kotlinx.collections.immutable.toImmutableList -internal suspend fun MatchDomainModel.toUi() = MatchUiModel( - uuid = uuid, - title = title, - description = description, - status = status.toUi(), - participants = participants - .asyncMap { it.toUi() } - .toImmutableList(), - isCreator = isCreator, - expiresAtDays = expiresAtDays, - expiresAtHours = expiresAtHours, - expiresAtMinutes = expiresAtMinutes, -) +internal suspend fun MatchDomainModel.toUi() = + MatchUiModel( + uuid = uuid, + title = title, + description = description, + status = status.toUi(), + participants = participants + .asyncMap { it.toUi() } + .toImmutableList(), + isCreator = isCreator, + expiresAtDays = expiresAtDays, + expiresAtHours = expiresAtHours, + expiresAtMinutes = expiresAtMinutes, + ) private fun MatchDomainStatus.toUi() = when (this) { MatchDomainStatus.PENDING -> MatchUiStatusModel.PENDING diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiModel.kt similarity index 89% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiModel.kt index 8784cf4f..07224dd4 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiModel.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.match.ui.model +package com.stslex.wizard.feature.match.ui.model import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingItem +import com.stslex.wizard.core.ui.base.paging.PagingItem import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiStatusModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiStatusModel.kt similarity index 75% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiStatusModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiStatusModel.kt index a85f0c9d..f2f5f2e9 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUiStatusModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUiStatusModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.model +package com.stslex.wizard.feature.match.ui.model import androidx.compose.runtime.Stable diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUserUiModel.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUserUiModel.kt similarity index 80% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUserUiModel.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUserUiModel.kt index 6cb5a4fe..899d26bf 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/model/MatchUserUiModel.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/model/MatchUserUiModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match.ui.model +package com.stslex.wizard.feature.match.ui.model import androidx.compose.runtime.Stable diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchScreenState.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchScreenState.kt similarity index 84% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchScreenState.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchScreenState.kt index c31ee576..ae3359f6 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchScreenState.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchScreenState.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.match.ui.store +package com.stslex.wizard.feature.match.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.AppError +import com.stslex.wizard.core.ui.base.AppError @Stable sealed interface MatchScreenState { diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStore.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt similarity index 80% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStore.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt index 47054206..1aabe518 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStore.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt @@ -1,23 +1,23 @@ -package com.stslex.feature.match.ui.store - -import com.stslex.core.core.AppDispatcher -import com.stslex.core.core.Logger -import com.stslex.core.database.store.UserStore -import com.stslex.core.ui.base.mapToAppError -import com.stslex.core.ui.base.paging.toUi -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.core.ui.pager.pager.StorePager -import com.stslex.core.ui.pager.pager.StorePagerFactory -import com.stslex.core.ui.pager.states.PagerLoadState -import com.stslex.feature.match.domain.interactor.MatchInteractor -import com.stslex.feature.match.navigation.MatchRouter -import com.stslex.feature.match.ui.model.MatchUiModel -import com.stslex.feature.match.ui.model.toUi -import com.stslex.feature.match.ui.store.MatchStoreComponent.Action -import com.stslex.feature.match.ui.store.MatchStoreComponent.Event -import com.stslex.feature.match.ui.store.MatchStoreComponent.Navigation -import com.stslex.feature.match.ui.store.MatchStoreComponent.State +package com.stslex.wizard.feature.match.ui.store + +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.database.store.UserStore +import com.stslex.wizard.core.ui.base.mapToAppError +import com.stslex.wizard.core.ui.base.paging.toUi +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.core.ui.pager.pager.StorePager +import com.stslex.wizard.core.ui.pager.pager.StorePagerFactory +import com.stslex.wizard.core.ui.pager.states.PagerLoadState +import com.stslex.wizard.feature.match.domain.interactor.MatchInteractor +import com.stslex.wizard.feature.match.navigation.MatchRouter +import com.stslex.wizard.feature.match.ui.model.MatchUiModel +import com.stslex.wizard.feature.match.ui.model.toUi +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Action +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Event +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.Navigation +import com.stslex.wizard.feature.match.ui.store.MatchStoreComponent.State import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map diff --git a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStoreComponent.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreComponent.kt similarity index 79% rename from feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStoreComponent.kt rename to feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreComponent.kt index e2556045..7fea4f35 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/feature/match/ui/store/MatchStoreComponent.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreComponent.kt @@ -1,12 +1,12 @@ -package com.stslex.feature.match.ui.store +package com.stslex.wizard.feature.match.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.base.paging.PagingConfig -import com.stslex.core.ui.base.paging.PagingUiState -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.core.ui.navigation.args.MatchScreenArgs -import com.stslex.feature.match.ui.model.MatchUiModel +import com.stslex.wizard.core.ui.base.paging.PagingConfig +import com.stslex.wizard.core.ui.base.paging.PagingUiState +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.core.ui.navigation.args.MatchScreenArgs +import com.stslex.wizard.feature.match.ui.model.MatchUiModel interface MatchStoreComponent : StoreComponent { diff --git a/feature/match_feed/build.gradle.kts b/feature/match_feed/build.gradle.kts index 1ce8b98b..1152787c 100644 --- a/feature/match_feed/build.gradle.kts +++ b/feature/match_feed/build.gradle.kts @@ -1,64 +1,11 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = - project.file(project.rootProject.projectDir.path + "/iosApp/FeatureMatchFeedPodfile") - framework { - baseName = "featureMatchFeed" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.match_feed" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) } } - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} \ No newline at end of file diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/di/MatchFeedModule.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/di/MatchFeedModule.kt deleted file mode 100644 index 25a697e6..00000000 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/di/MatchFeedModule.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.stslex.feature.match_feed.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.match_feed.data.repository.MatchFeedMockRepositoryImpl -import com.stslex.feature.match_feed.data.repository.MatchFeedRepository -import com.stslex.feature.match_feed.domain.MatchFeedInteractor -import com.stslex.feature.match_feed.domain.MatchFeedInteractorImpl -import com.stslex.feature.match_feed.navigation.MatchFeedRouter -import com.stslex.feature.match_feed.navigation.MatchFeedRouterImpl -import com.stslex.feature.match_feed.ui.store.MatchFeedStore -import org.koin.dsl.module - -val featureMatchFeedModule = module { - factory { MatchFeedMockRepositoryImpl(client = get()) } - factory { MatchFeedInteractorImpl(repository = get()) } - factory { MatchFeedRouterImpl(navigator = get()) } - storeDefinition { - MatchFeedStore( - interactor = get(), - appDispatcher = get(), - router = get() - ) - } -} \ No newline at end of file diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouter.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouter.kt deleted file mode 100644 index 88f13662..00000000 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.stslex.feature.match_feed.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation - -interface MatchFeedRouter : Router - diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/FilmData.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/FilmData.kt similarity index 75% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/FilmData.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/FilmData.kt index 2aed337c..b46e7ec7 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/FilmData.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/FilmData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.data.model +package com.stslex.wizard.feature.match_feed.data.model data class FilmData( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchData.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchData.kt similarity index 70% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchData.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchData.kt index 442d0277..4a05738b 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchData.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.data.model +package com.stslex.wizard.feature.match_feed.data.model data class MatchData( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchFilmsPagingData.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchFilmsPagingData.kt similarity index 62% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchFilmsPagingData.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchFilmsPagingData.kt index c668e064..69903e26 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchFilmsPagingData.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchFilmsPagingData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.data.model +package com.stslex.wizard.feature.match_feed.data.model data class MatchFilmsPagingData( val films: List, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchPagingData.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchPagingData.kt similarity index 61% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchPagingData.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchPagingData.kt index 10c265d6..4ed9f29a 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchPagingData.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchPagingData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.data.model +package com.stslex.wizard.feature.match_feed.data.model data class MatchPagingData( val matches: List, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchParticipantData.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchParticipantData.kt similarity index 64% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchParticipantData.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchParticipantData.kt index 9f5c3e79..3fc613a9 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/model/MatchParticipantData.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/model/MatchParticipantData.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.data.model +package com.stslex.wizard.feature.match_feed.data.model data class MatchParticipantData( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt similarity index 74% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt index 5d34f00b..df7d9648 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedMockRepositoryImpl.kt @@ -1,11 +1,11 @@ -package com.stslex.feature.match_feed.data.repository +package com.stslex.wizard.feature.match_feed.data.repository -import com.stslex.core.network.clients.film.client.FilmClient -import com.stslex.feature.match_feed.data.model.FilmData -import com.stslex.feature.match_feed.data.model.MatchData -import com.stslex.feature.match_feed.data.model.MatchFilmsPagingData -import com.stslex.feature.match_feed.data.model.MatchPagingData -import com.stslex.feature.match_feed.data.model.MatchParticipantData +import com.stslex.wizard.core.network.clients.film.client.FilmClient +import com.stslex.wizard.feature.match_feed.data.model.FilmData +import com.stslex.wizard.feature.match_feed.data.model.MatchData +import com.stslex.wizard.feature.match_feed.data.model.MatchFilmsPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchParticipantData import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepository.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepository.kt similarity index 55% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepository.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepository.kt index 2bca735d..781e7f0f 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepository.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepository.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.match_feed.data.repository +package com.stslex.wizard.feature.match_feed.data.repository -import com.stslex.feature.match_feed.data.model.MatchData -import com.stslex.feature.match_feed.data.model.MatchFilmsPagingData -import com.stslex.feature.match_feed.data.model.MatchPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchData +import com.stslex.wizard.feature.match_feed.data.model.MatchFilmsPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchPagingData import kotlinx.coroutines.flow.Flow interface MatchFeedRepository { diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt similarity index 62% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt index 0e5ca2c8..95b0622d 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/data/repository/MatchFeedRepositoryImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.match_feed.data.repository +package com.stslex.wizard.feature.match_feed.data.repository -import com.stslex.core.network.clients.film.client.FilmClient -import com.stslex.feature.match_feed.data.model.MatchData -import com.stslex.feature.match_feed.data.model.MatchFilmsPagingData -import com.stslex.feature.match_feed.data.model.MatchPagingData +import com.stslex.wizard.core.network.clients.film.client.FilmClient +import com.stslex.wizard.feature.match_feed.data.model.MatchData +import com.stslex.wizard.feature.match_feed.data.model.MatchFilmsPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchPagingData import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/MatchFeedModule.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/MatchFeedModule.kt new file mode 100644 index 00000000..9dcbe74b --- /dev/null +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/MatchFeedModule.kt @@ -0,0 +1,28 @@ +package com.stslex.wizard.feature.match_feed.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.match_feed.data.repository.MatchFeedMockRepositoryImpl +import com.stslex.wizard.feature.match_feed.data.repository.MatchFeedRepository +import com.stslex.wizard.feature.match_feed.domain.MatchFeedInteractor +import com.stslex.wizard.feature.match_feed.domain.MatchFeedInteractorImpl +import com.stslex.wizard.feature.match_feed.navigation.MatchFeedRouter +import com.stslex.wizard.feature.match_feed.navigation.MatchFeedRouterImpl +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStore +import org.koin.dsl.module + +val featureMatchFeedModule = module { + factory { MatchFeedMockRepositoryImpl(client = get()) } + factory { MatchFeedInteractorImpl(repository = get()) } + factory { + MatchFeedRouterImpl( + navigator = get() + ) + } + storeDefinition { + MatchFeedStore( + interactor = get(), + appDispatcher = get(), + router = get() + ) + } +} \ No newline at end of file diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractor.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractor.kt similarity index 55% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractor.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractor.kt index d4fd34a2..fe37be7a 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractor.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractor.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.match_feed.domain +package com.stslex.wizard.feature.match_feed.domain -import com.stslex.feature.match_feed.domain.model.MatchDomain -import com.stslex.feature.match_feed.domain.model.MatchFilmsPagingDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchFilmsPagingDomain import kotlinx.coroutines.flow.Flow interface MatchFeedInteractor { diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractorImpl.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractorImpl.kt similarity index 63% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractorImpl.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractorImpl.kt index db776ec2..e0e3057a 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/MatchFeedInteractorImpl.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/MatchFeedInteractorImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.match_feed.domain +package com.stslex.wizard.feature.match_feed.domain -import com.stslex.feature.match_feed.data.repository.MatchFeedRepository -import com.stslex.feature.match_feed.domain.model.MatchDomain -import com.stslex.feature.match_feed.domain.model.MatchFilmsPagingDomain -import com.stslex.feature.match_feed.domain.model.toDomain +import com.stslex.wizard.feature.match_feed.data.repository.MatchFeedRepository +import com.stslex.wizard.feature.match_feed.domain.model.MatchDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchFilmsPagingDomain +import com.stslex.wizard.feature.match_feed.domain.model.toDomain import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/FilmDomain.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/FilmDomain.kt similarity index 75% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/FilmDomain.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/FilmDomain.kt index f9ad3bba..80d13714 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/FilmDomain.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/FilmDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model data class FilmDomain( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomain.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomain.kt similarity index 70% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomain.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomain.kt index e068d52b..2783d62d 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomain.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model data class MatchDomain( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomainMapper.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomainMapper.kt similarity index 54% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomainMapper.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomainMapper.kt index f033780a..d1cc456b 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchDomainMapper.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchDomainMapper.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model -import com.stslex.feature.match_feed.data.model.FilmData -import com.stslex.feature.match_feed.data.model.MatchData -import com.stslex.feature.match_feed.data.model.MatchFilmsPagingData -import com.stslex.feature.match_feed.data.model.MatchParticipantData +import com.stslex.wizard.feature.match_feed.data.model.FilmData +import com.stslex.wizard.feature.match_feed.data.model.MatchData +import com.stslex.wizard.feature.match_feed.data.model.MatchFilmsPagingData +import com.stslex.wizard.feature.match_feed.data.model.MatchParticipantData fun MatchData.toDomain() = MatchDomain( uuid = uuid, @@ -23,7 +23,7 @@ fun MatchFilmsPagingData.toDomain() = MatchFilmsPagingDomain( hasNext = hasNext, ) -fun FilmData.toDomain() = FilmDomain( +fun FilmData.toDomain() = com.stslex.wizard.feature.match_feed.domain.model.FilmDomain( uuid = uuid, title = title, description = description, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt similarity index 62% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt index a6dccc2b..78a1b807 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchFilmsPagingDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model data class MatchFilmsPagingDomain( val films: List, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchPagingDomain.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchPagingDomain.kt similarity index 62% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchPagingDomain.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchPagingDomain.kt index 2a9eeaf4..4657fd2b 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchPagingDomain.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchPagingDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model data class MatchPagingDomain( val matches: List, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchParticipantDomain.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchParticipantDomain.kt similarity index 64% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchParticipantDomain.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchParticipantDomain.kt index 5f193f5c..066039d5 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/domain/model/MatchParticipantDomain.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/domain/model/MatchParticipantDomain.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.domain.model +package com.stslex.wizard.feature.match_feed.domain.model data class MatchParticipantDomain( val uuid: String, diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt new file mode 100644 index 00000000..eee5ad06 --- /dev/null +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt @@ -0,0 +1,7 @@ +package com.stslex.wizard.feature.match_feed.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation + +interface MatchFeedRouter : Router + diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouterImpl.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouterImpl.kt similarity index 57% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouterImpl.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouterImpl.kt index e4cb015c..8c4e334a 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/navigation/MatchFeedRouterImpl.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.match_feed.navigation +package com.stslex.wizard.feature.match_feed.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation class MatchFeedRouterImpl( private val navigator: AppNavigator diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/MatchFeedScreen.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/MatchFeedScreen.kt similarity index 74% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/MatchFeedScreen.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/MatchFeedScreen.kt index 240b53ba..efebeaa1 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/MatchFeedScreen.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/MatchFeedScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui +package com.stslex.wizard.feature.match_feed.ui import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -9,15 +9,15 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.mvi.getStore -import com.stslex.feature.match_feed.ui.components.MatchFeedScreenContent -import com.stslex.feature.match_feed.ui.components.MatchFeedScreenError -import com.stslex.feature.match_feed.ui.components.MatchFeedScreenLoading -import com.stslex.feature.match_feed.ui.store.MatchFeedStore -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Action -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Event.ErrorSnackBar -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.State -import com.stslex.feature.match_feed.ui.store.ScreenState +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.feature.match_feed.ui.components.MatchFeedScreenContent +import com.stslex.wizard.feature.match_feed.ui.components.MatchFeedScreenError +import com.stslex.wizard.feature.match_feed.ui.components.MatchFeedScreenLoading +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStore +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Action +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Event.ErrorSnackBar +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.State +import com.stslex.wizard.feature.match_feed.ui.store.ScreenState object MatchFeedScreen : Screen { diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenContent.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenContent.kt similarity index 92% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenContent.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenContent.kt index 63d5143e..e392b98c 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenContent.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenContent.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.components +package com.stslex.wizard.feature.match_feed.ui.components import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.BoxWithConstraints @@ -12,9 +12,9 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.core.core.Logger -import com.stslex.feature.match_feed.ui.model.FilmUi -import com.stslex.feature.match_feed.ui.store.ScreenState +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.feature.match_feed.ui.model.FilmUi +import com.stslex.wizard.feature.match_feed.ui.store.ScreenState import kotlinx.collections.immutable.ImmutableList import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.distinctUntilChanged diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenError.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenError.kt similarity index 88% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenError.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenError.kt index e37d934a..4de8184d 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenError.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenError.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.components +package com.stslex.wizard.feature.match_feed.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.material3.Text diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt similarity index 96% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt index e94deb92..60c8a688 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenFilmItem.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.components +package com.stslex.wizard.feature.match_feed.ui.components import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background @@ -35,10 +35,10 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp -import com.stslex.core.ui.base.image.NetworkImage -import com.stslex.core.ui.base.onClickDelay -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.match_feed.ui.model.FilmUi +import com.stslex.wizard.core.ui.base.image.NetworkImage +import com.stslex.wizard.core.ui.base.onClickDelay +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.match_feed.ui.model.FilmUi import kotlinx.collections.immutable.ImmutableList import kotlinx.coroutines.delay import kotlinx.coroutines.flow.distinctUntilChanged diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenLoading.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenLoading.kt similarity index 90% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenLoading.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenLoading.kt index 28d3ef06..2fefe007 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/MatchFeedScreenLoading.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/MatchFeedScreenLoading.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.components +package com.stslex.wizard.feature.match_feed.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/UiExt.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/UiExt.kt similarity index 90% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/UiExt.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/UiExt.kt index b926482c..0c129b88 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/components/UiExt.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/components/UiExt.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.components +package com.stslex.wizard.feature.match_feed.ui.components import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.pager.PagerState diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/FilmUi.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/FilmUi.kt similarity index 83% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/FilmUi.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/FilmUi.kt index 02be8cde..ccc0311e 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/FilmUi.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/FilmUi.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model import androidx.compose.runtime.Stable import kotlinx.collections.immutable.ImmutableList diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchDomainMapper.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchDomainMapper.kt similarity index 65% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchDomainMapper.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchDomainMapper.kt index 9186983a..61c8e944 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchDomainMapper.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchDomainMapper.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model -import com.stslex.feature.match_feed.domain.model.FilmDomain -import com.stslex.feature.match_feed.domain.model.MatchDomain -import com.stslex.feature.match_feed.domain.model.MatchFilmsPagingDomain -import com.stslex.feature.match_feed.domain.model.MatchParticipantDomain +import com.stslex.wizard.feature.match_feed.domain.model.FilmDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchFilmsPagingDomain +import com.stslex.wizard.feature.match_feed.domain.model.MatchParticipantDomain import kotlinx.collections.immutable.toImmutableList fun List.toUI(): List = map { it.toUI() } diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchFilmsPagingUi.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchFilmsPagingUi.kt similarity index 78% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchFilmsPagingUi.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchFilmsPagingUi.kt index ab8159bc..df413423 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchFilmsPagingUi.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchFilmsPagingUi.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model import androidx.compose.runtime.Stable import kotlinx.collections.immutable.ImmutableList diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchPagingUi.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchPagingUi.kt similarity index 78% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchPagingUi.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchPagingUi.kt index fbbb457c..3096c3eb 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchPagingUi.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchPagingUi.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model import kotlinx.collections.immutable.ImmutableList import androidx.compose.runtime.Stable diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchParticipantUi.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchParticipantUi.kt similarity index 73% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchParticipantUi.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchParticipantUi.kt index 27d67ac7..958299ab 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchParticipantUi.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchParticipantUi.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model import androidx.compose.runtime.Stable diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchUi.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchUi.kt similarity index 76% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchUi.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchUi.kt index 97afc5ae..9d7e7a29 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/model/MatchUi.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/model/MatchUi.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.model +package com.stslex.wizard.feature.match_feed.ui.model import androidx.compose.runtime.Stable diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStore.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt similarity index 83% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStore.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt index c93249f8..d0ddb210 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStore.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt @@ -1,15 +1,15 @@ -package com.stslex.feature.match_feed.ui.store +package com.stslex.wizard.feature.match_feed.ui.store -import com.stslex.core.core.AppDispatcher -import com.stslex.core.core.Logger -import com.stslex.core.ui.mvi.Store -import com.stslex.feature.match_feed.domain.MatchFeedInteractor -import com.stslex.feature.match_feed.navigation.MatchFeedRouter -import com.stslex.feature.match_feed.ui.model.toUI -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Action -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Event -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation -import com.stslex.feature.match_feed.ui.store.MatchFeedStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.core.Logger +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.feature.match_feed.domain.MatchFeedInteractor +import com.stslex.wizard.feature.match_feed.navigation.MatchFeedRouter +import com.stslex.wizard.feature.match_feed.ui.model.toUI +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Action +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Event +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.Navigation +import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStoreComponent.State import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.Job diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStoreComponent.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreComponent.kt similarity index 81% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStoreComponent.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreComponent.kt index 4166a3f5..1122fa5f 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/MatchFeedStoreComponent.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreComponent.kt @@ -1,10 +1,10 @@ -package com.stslex.feature.match_feed.ui.store +package com.stslex.wizard.feature.match_feed.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.feature.match_feed.ui.components.SwipeDirection -import com.stslex.feature.match_feed.ui.model.FilmUi -import com.stslex.feature.match_feed.ui.model.MatchUi +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.feature.match_feed.ui.components.SwipeDirection +import com.stslex.wizard.feature.match_feed.ui.model.FilmUi +import com.stslex.wizard.feature.match_feed.ui.model.MatchUi import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/ScreenState.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/ScreenState.kt similarity index 85% rename from feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/ScreenState.kt rename to feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/ScreenState.kt index ec1ec362..983555d4 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/feature/match_feed/ui/store/ScreenState.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/ScreenState.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.match_feed.ui.store +package com.stslex.wizard.feature.match_feed.ui.store import androidx.compose.runtime.Stable diff --git a/feature/profile/build.gradle.kts b/feature/profile/build.gradle.kts index 2a7ac91f..960a0305 100644 --- a/feature/profile/build.gradle.kts +++ b/feature/profile/build.gradle.kts @@ -1,64 +1,12 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) + implementation(project(":core:database")) } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = project.file(project.rootProject.projectDir.path + "/iosApp/FeatureFilmPodfile") - framework { - baseName = "featureProfile" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - implementation(project(":core:database")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.film" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} +} \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/di/ProfileModule.kt b/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/di/ProfileModule.kt deleted file mode 100644 index 6ec73aa6..00000000 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/di/ProfileModule.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.stslex.feature.profile.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.profile.data.repository.ProfileRepository -import com.stslex.feature.profile.data.repository.ProfileRepositoryImpl -import com.stslex.feature.profile.domain.interactor.ProfileInteractor -import com.stslex.feature.profile.domain.interactor.ProfileInteractorImpl -import com.stslex.feature.profile.navigation.ProfileRouter -import com.stslex.feature.profile.navigation.ProfileRouterImpl -import com.stslex.feature.profile.ui.store.ProfileStore -import org.koin.dsl.module - -val featureProfileModule = module { - storeDefinition { - ProfileStore( - interactor = get(), - userStore = get(), - appDispatcher = get(), - router = get(), - ) - } - factory { ProfileRouterImpl(navigator = get()) } - factory { - ProfileRepositoryImpl( - client = get(), - dataStore = get(), - ) - } - factory { - ProfileInteractorImpl( - repository = get(), - authController = get(), - ) - } -} \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouter.kt b/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouter.kt deleted file mode 100644 index 004ac468..00000000 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.profile.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.profile.ui.store.ProfileStoreComponent - -interface ProfileRouter : Router \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataMapper.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataMapper.kt similarity index 72% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataMapper.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataMapper.kt index e9365587..5ef4bb12 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataMapper.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.profile.data.model +package com.stslex.wizard.feature.profile.data.model -import com.stslex.core.network.clients.profile.model.response.UserResponse +import com.stslex.wizard.core.network.clients.profile.model.response.UserResponse fun UserResponse.toData() = ProfileDataModel( uuid = uuid, diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataModel.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataModel.kt similarity index 85% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataModel.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataModel.kt index e6c7c1e8..b0d37d7d 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/model/ProfileDataModel.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/model/ProfileDataModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.data.model +package com.stslex.wizard.feature.profile.data.model data class ProfileDataModel( val uuid: String, diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepository.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepository.kt similarity index 57% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepository.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepository.kt index 3c164a86..9bb77acd 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepository.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepository.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.profile.data.repository +package com.stslex.wizard.feature.profile.data.repository -import com.stslex.feature.profile.data.model.ProfileDataModel +import com.stslex.wizard.feature.profile.data.model.ProfileDataModel import kotlinx.coroutines.flow.Flow interface ProfileRepository { diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepositoryImpl.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepositoryImpl.kt similarity index 63% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepositoryImpl.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepositoryImpl.kt index b488989f..717b0b24 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/data/repository/ProfileRepositoryImpl.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/data/repository/ProfileRepositoryImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.profile.data.repository +package com.stslex.wizard.feature.profile.data.repository -import com.stslex.core.database.store.UserStore -import com.stslex.core.network.clients.profile.client.ProfileClient -import com.stslex.feature.profile.data.model.ProfileDataModel -import com.stslex.feature.profile.data.model.toData +import com.stslex.wizard.core.database.store.UserStore +import com.stslex.wizard.core.network.clients.profile.client.ProfileClient +import com.stslex.wizard.feature.profile.data.model.ProfileDataModel +import com.stslex.wizard.feature.profile.data.model.toData import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ProfileModule.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ProfileModule.kt new file mode 100644 index 00000000..564066a9 --- /dev/null +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ProfileModule.kt @@ -0,0 +1,35 @@ +package com.stslex.wizard.feature.profile.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.profile.data.repository.ProfileRepository +import com.stslex.wizard.feature.profile.data.repository.ProfileRepositoryImpl +import com.stslex.wizard.feature.profile.domain.interactor.ProfileInteractor +import com.stslex.wizard.feature.profile.domain.interactor.ProfileInteractorImpl +import com.stslex.wizard.feature.profile.navigation.ProfileRouter +import com.stslex.wizard.feature.profile.navigation.ProfileRouterImpl +import com.stslex.wizard.feature.profile.ui.store.ProfileStore +import org.koin.dsl.module + +val featureProfileModule = module { + storeDefinition { + ProfileStore( + interactor = get(), + userStore = get(), + appDispatcher = get(), + router = get(), + ) + } + factory { ProfileRouterImpl(navigator = get()) } + factory { + ProfileRepositoryImpl( + client = get(), + dataStore = get(), + ) + } + factory { + ProfileInteractorImpl( + repository = get(), + authController = get(), + ) + } +} \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractor.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractor.kt similarity index 53% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractor.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractor.kt index c682ef8b..291f70c5 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractor.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractor.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.profile.domain.interactor +package com.stslex.wizard.feature.profile.domain.interactor -import com.stslex.feature.profile.domain.model.ProfileDomainModel +import com.stslex.wizard.feature.profile.domain.model.ProfileDomainModel import kotlinx.coroutines.flow.Flow interface ProfileInteractor { diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractorImpl.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractorImpl.kt similarity index 56% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractorImpl.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractorImpl.kt index 012e2e63..f9b9464f 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/interactor/ProfileInteractorImpl.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/interactor/ProfileInteractorImpl.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.profile.domain.interactor +package com.stslex.wizard.feature.profile.domain.interactor -import com.stslex.core.network.utils.token.AuthController -import com.stslex.feature.profile.data.repository.ProfileRepository -import com.stslex.feature.profile.domain.model.ProfileDomainModel -import com.stslex.feature.profile.domain.model.toDomain +import com.stslex.wizard.core.network.utils.token.AuthController +import com.stslex.wizard.feature.profile.data.repository.ProfileRepository +import com.stslex.wizard.feature.profile.domain.model.ProfileDomainModel +import com.stslex.wizard.feature.profile.domain.model.toDomain import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainMapper.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainMapper.kt similarity index 73% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainMapper.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainMapper.kt index e1f9f09b..84aad754 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainMapper.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.profile.domain.model +package com.stslex.wizard.feature.profile.domain.model -import com.stslex.feature.profile.data.model.ProfileDataModel +import com.stslex.wizard.feature.profile.data.model.ProfileDataModel fun ProfileDataModel.toDomain() = ProfileDomainModel( uuid = uuid, diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainModel.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainModel.kt similarity index 85% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainModel.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainModel.kt index 3aeaab16..c52d11c3 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/domain/model/ProfileDomainModel.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/domain/model/ProfileDomainModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.domain.model +package com.stslex.wizard.feature.profile.domain.model data class ProfileDomainModel( val uuid: String, diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt new file mode 100644 index 00000000..9bbb70e7 --- /dev/null +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.profile.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent + +interface ProfileRouter : Router \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouterImpl.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouterImpl.kt similarity index 73% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouterImpl.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouterImpl.kt index b472ccf9..acd4785f 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileRouterImpl.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.profile.navigation +package com.stslex.wizard.feature.profile.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Navigation +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Navigation class ProfileRouterImpl( private val navigator: AppNavigator diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileScreenArguments.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileScreenArguments.kt similarity index 84% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileScreenArguments.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileScreenArguments.kt index b18d52cb..eaec9fc6 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/navigation/ProfileScreenArguments.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileScreenArguments.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.navigation +package com.stslex.wizard.feature.profile.navigation sealed interface ProfileScreenArguments { diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/ProfileScreen.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/ProfileScreen.kt similarity index 84% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/ProfileScreen.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/ProfileScreen.kt index a95f4b29..fb7ec9e7 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/ProfileScreen.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/ProfileScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui +package com.stslex.wizard.feature.profile.ui import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -20,17 +20,17 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.network.api.server.model.ErrorRefresh -import com.stslex.core.ui.components.AppSnackbarHost -import com.stslex.core.ui.mvi.getStore -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.profile.navigation.ProfileScreenArguments -import com.stslex.feature.profile.ui.components.ProfileScreenContent -import com.stslex.feature.profile.ui.store.ProfileScreenState -import com.stslex.feature.profile.ui.store.ProfileStore -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Action -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Event -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.State +import com.stslex.wizard.core.network.api.server.model.ErrorRefresh +import com.stslex.wizard.core.ui.components.AppSnackbarHost +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.profile.navigation.ProfileScreenArguments +import com.stslex.wizard.feature.profile.ui.components.ProfileScreenContent +import com.stslex.wizard.feature.profile.ui.store.ProfileScreenState +import com.stslex.wizard.feature.profile.ui.store.ProfileStore +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Action +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Event +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.State data class ProfileScreen( val args: ProfileScreenArguments diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileAvatar.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileAvatar.kt similarity index 83% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileAvatar.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileAvatar.kt index eb3cfac9..b2b44853 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileAvatar.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileAvatar.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.components +package com.stslex.wizard.feature.profile.ui.components import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -9,9 +9,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import com.stslex.core.ui.base.image.NetworkImage -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.profile.ui.model.ProfileAvatarModel +import com.stslex.wizard.core.ui.base.image.NetworkImage +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.profile.ui.model.ProfileAvatarModel @Composable fun ProfileAvatar( diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileInfo.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileInfo.kt similarity index 96% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileInfo.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileInfo.kt index 16972a12..c4d18cd7 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileInfo.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileInfo.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.components +package com.stslex.wizard.feature.profile.ui.components import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -10,7 +10,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import com.stslex.core.ui.theme.AppDimension +import com.stslex.wizard.core.ui.theme.AppDimension @Composable fun ProfileInfo( diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileLoadingIndicator.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileLoadingIndicator.kt similarity index 90% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileLoadingIndicator.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileLoadingIndicator.kt index a1f60a13..55386bf4 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileLoadingIndicator.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileLoadingIndicator.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.components +package com.stslex.wizard.feature.profile.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenContent.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenContent.kt similarity index 87% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenContent.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenContent.kt index 0e567490..3882d172 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenContent.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenContent.kt @@ -1,12 +1,12 @@ -package com.stslex.feature.profile.ui.components +package com.stslex.wizard.feature.profile.ui.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.feature.profile.ui.store.ProfileScreenState -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Action +import com.stslex.wizard.feature.profile.ui.store.ProfileScreenState +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Action @Composable internal fun ProfileScreenContent( diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenToolbar.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenToolbar.kt similarity index 90% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenToolbar.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenToolbar.kt index 4918ae75..393d86e8 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/components/ProfileScreenToolbar.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/components/ProfileScreenToolbar.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.components +package com.stslex.wizard.feature.profile.ui.components import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Settings @@ -7,7 +7,7 @@ import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import com.stslex.core.ui.components.AppToolbar +import com.stslex.wizard.core.ui.components.AppToolbar @Composable fun ProfileScreenToolbar( diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileAvatarModel.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileAvatarModel.kt similarity index 86% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileAvatarModel.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileAvatarModel.kt index ec2046fc..88837f11 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileAvatarModel.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileAvatarModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.model +package com.stslex.wizard.feature.profile.ui.model import androidx.compose.runtime.Stable import androidx.compose.ui.graphics.Color diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileModel.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileModel.kt similarity index 87% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileModel.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileModel.kt index 2fa09ae6..74bfd29e 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileModel.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileModel.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.profile.ui.model +package com.stslex.wizard.feature.profile.ui.model import androidx.compose.runtime.Stable diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileUiMapper.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileUiMapper.kt similarity index 75% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileUiMapper.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileUiMapper.kt index fe757cfd..caf7b30b 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/model/ProfileUiMapper.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/model/ProfileUiMapper.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.profile.ui.model +package com.stslex.wizard.feature.profile.ui.model -import com.stslex.feature.profile.domain.model.ProfileDomainModel +import com.stslex.wizard.feature.profile.domain.model.ProfileDomainModel fun ProfileDomainModel.toUi( avatarModel: ProfileAvatarModel diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileScreenState.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileScreenState.kt similarity index 82% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileScreenState.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileScreenState.kt index 5ce8bfe2..79871e45 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileScreenState.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileScreenState.kt @@ -1,7 +1,7 @@ -package com.stslex.feature.profile.ui.store +package com.stslex.wizard.feature.profile.ui.store import androidx.compose.runtime.Stable -import com.stslex.feature.profile.ui.model.ProfileModel +import com.stslex.wizard.feature.profile.ui.model.ProfileModel @Stable sealed interface ProfileScreenState { diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStore.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt similarity index 82% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStore.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt index d0dd57c8..ae97968c 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStore.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt @@ -1,18 +1,18 @@ -package com.stslex.feature.profile.ui.store +package com.stslex.wizard.feature.profile.ui.store import androidx.compose.ui.graphics.Color -import com.stslex.core.core.AppDispatcher -import com.stslex.core.database.store.UserStore -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.profile.domain.interactor.ProfileInteractor -import com.stslex.feature.profile.navigation.ProfileRouter -import com.stslex.feature.profile.ui.model.ProfileAvatarModel -import com.stslex.feature.profile.ui.model.toUi -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Action -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Event -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.Navigation -import com.stslex.feature.profile.ui.store.ProfileStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.database.store.UserStore +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.profile.domain.interactor.ProfileInteractor +import com.stslex.wizard.feature.profile.navigation.ProfileRouter +import com.stslex.wizard.feature.profile.ui.model.ProfileAvatarModel +import com.stslex.wizard.feature.profile.ui.model.toUi +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Action +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Event +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.Navigation +import com.stslex.wizard.feature.profile.ui.store.ProfileStoreComponent.State class ProfileStore( private val interactor: ProfileInteractor, diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStoreComponent.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreComponent.kt similarity index 86% rename from feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStoreComponent.kt rename to feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreComponent.kt index 01f7b241..a396901f 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/feature/profile/ui/store/ProfileStoreComponent.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreComponent.kt @@ -1,9 +1,9 @@ -package com.stslex.feature.profile.ui.store +package com.stslex.wizard.feature.profile.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.profile.navigation.ProfileScreenArguments +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.profile.navigation.ProfileScreenArguments interface ProfileStoreComponent : StoreComponent { diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index 1627d1e4..a2b87c0e 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -1,65 +1,12 @@ plugins { - alias(libs.plugins.kotlinMultiplatform) - alias(libs.plugins.androidLibrary) - alias(libs.plugins.jetbrainsCompose) - alias(libs.plugins.kotlinCocoapods) + alias(libs.plugins.convention.kmp.library.compose) } kotlin { - androidTarget { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } - - iosX64() - iosArm64() - iosSimulatorArm64() - cocoapods { - summary = "Some description for the Shared Module" - homepage = "Link to the Shared Module homepage" - version = "1.0" - ios.deploymentTarget = "16.0" - podfile = - project.file(project.rootProject.projectDir.path + "/iosApp/FeatureSettingsPodfile") - framework { - baseName = "featureSettings" - } - } - - sourceSets { - commonMain.dependencies { - implementation(project(":core:core")) - implementation(project(":core:ui")) - implementation(project(":core:network")) - implementation(project(":core:database")) - } - commonTest.dependencies { - implementation(libs.kotlin.test) - } - } -} - -android { - namespace = "com.stslex.feature.settings" - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() + sourceSets.commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui")) + implementation(project(":core:network")) + implementation(project(":core:database")) } } - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectDir/build/compose/metrics", - ) -} - -tasks.withType { - compilerOptions.freeCompilerArgs.addAll( - "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectDir/build/compose/reports", - ) -} \ No newline at end of file diff --git a/feature/settings/consumer-rules.pro b/feature/settings/consumer-rules.pro deleted file mode 100644 index e69de29b..00000000 diff --git a/feature/settings/proguard-rules.pro b/feature/settings/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/feature/settings/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/di/SettingsModule.kt b/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/di/SettingsModule.kt deleted file mode 100644 index 29be1ed7..00000000 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/di/SettingsModule.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.stslex.feature.settings.di - -import com.stslex.core.ui.mvi.storeDefinition -import com.stslex.feature.settings.domain.SettingsInteractor -import com.stslex.feature.settings.domain.SettingsInteractorImpl -import com.stslex.feature.settings.navigation.SettingsRouter -import com.stslex.feature.settings.navigation.SettingsRouterImpl -import com.stslex.feature.settings.ui.store.SettingsStore -import org.koin.dsl.module - -val featureSettingsModule = module { - storeDefinition { - SettingsStore( - interactor = get(), - appDispatcher = get(), - router = get(), - ) - } - factory { SettingsRouterImpl(navigator = get()) } - factory { SettingsInteractorImpl(authController = get()) } -} \ No newline at end of file diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouter.kt b/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouter.kt deleted file mode 100644 index 9fe9df25..00000000 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.stslex.feature.settings.navigation - -import com.stslex.core.ui.mvi.Router -import com.stslex.feature.settings.ui.store.SettingsStoreComponent - -interface SettingsRouter : Router diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/SettingsModule.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/SettingsModule.kt new file mode 100644 index 00000000..2b6eda97 --- /dev/null +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/SettingsModule.kt @@ -0,0 +1,21 @@ +package com.stslex.wizard.feature.settings.di + +import com.stslex.wizard.core.ui.mvi.storeDefinition +import com.stslex.wizard.feature.settings.domain.SettingsInteractor +import com.stslex.wizard.feature.settings.domain.SettingsInteractorImpl +import com.stslex.wizard.feature.settings.navigation.SettingsRouter +import com.stslex.wizard.feature.settings.navigation.SettingsRouterImpl +import com.stslex.wizard.feature.settings.ui.store.SettingsStore +import org.koin.dsl.module + +val featureSettingsModule = module { + storeDefinition { + SettingsStore( + interactor = get(), + appDispatcher = get(), + router = get(), + ) + } + factory { SettingsRouterImpl(navigator = get()) } + factory { SettingsInteractorImpl(authController = get()) } +} \ No newline at end of file diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractor.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractor.kt similarity index 54% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractor.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractor.kt index 10ca0edb..9a54c2fc 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractor.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractor.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.settings.domain +package com.stslex.wizard.feature.settings.domain interface SettingsInteractor { diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractorImpl.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractorImpl.kt similarity index 61% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractorImpl.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractorImpl.kt index 60bf33e5..8f2e05ad 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/domain/SettingsInteractorImpl.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/domain/SettingsInteractorImpl.kt @@ -1,6 +1,6 @@ -package com.stslex.feature.settings.domain +package com.stslex.wizard.feature.settings.domain -import com.stslex.core.network.utils.token.AuthController +import com.stslex.wizard.core.network.utils.token.AuthController class SettingsInteractorImpl( private val authController: AuthController diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt new file mode 100644 index 00000000..67144099 --- /dev/null +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt @@ -0,0 +1,6 @@ +package com.stslex.wizard.feature.settings.navigation + +import com.stslex.wizard.core.ui.mvi.Router +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent + +interface SettingsRouter : Router diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouterImpl.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouterImpl.kt similarity index 56% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouterImpl.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouterImpl.kt index 6e7cad0e..5b6bd31f 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/navigation/SettingsRouterImpl.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouterImpl.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.settings.navigation +package com.stslex.wizard.feature.settings.navigation -import com.stslex.core.ui.navigation.AppNavigator -import com.stslex.core.ui.navigation.AppScreen -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Navigation +import com.stslex.wizard.core.ui.navigation.AppNavigator +import com.stslex.wizard.core.ui.navigation.AppScreen +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Navigation class SettingsRouterImpl( private val navigator: AppNavigator diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/SettingsScreen.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/SettingsScreen.kt similarity index 80% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/SettingsScreen.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/SettingsScreen.kt index c4196e61..d314080c 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/SettingsScreen.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/SettingsScreen.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.settings.ui +package com.stslex.wizard.feature.settings.ui import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column @@ -16,15 +16,15 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import cafe.adriel.voyager.core.screen.Screen -import com.stslex.core.ui.components.AppSnackbarHost -import com.stslex.core.ui.components.AppToolbar -import com.stslex.core.ui.mvi.getStore -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.settings.ui.components.SettingsContent -import com.stslex.feature.settings.ui.store.SettingsStore -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Action -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Event -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.State +import com.stslex.wizard.core.ui.components.AppSnackbarHost +import com.stslex.wizard.core.ui.components.AppToolbar +import com.stslex.wizard.core.ui.mvi.getStore +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.settings.ui.components.SettingsContent +import com.stslex.wizard.feature.settings.ui.store.SettingsStore +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Action +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Event +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.State object SettingsScreen : Screen { diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/components/SettingsContent.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/components/SettingsContent.kt similarity index 93% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/components/SettingsContent.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/components/SettingsContent.kt index c22396af..64d1a327 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/components/SettingsContent.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/components/SettingsContent.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.settings.ui.components +package com.stslex.wizard.feature.settings.ui.components import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize @@ -16,8 +16,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.style.TextOverflow -import com.stslex.core.ui.theme.AppDimension -import com.stslex.feature.settings.ui.model.SettingsColumnItems +import com.stslex.wizard.core.ui.theme.AppDimension +import com.stslex.wizard.feature.settings.ui.model.SettingsColumnItems @Composable fun SettingsContent( diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/model/SettingsColumnItems.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/model/SettingsColumnItems.kt similarity index 87% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/model/SettingsColumnItems.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/model/SettingsColumnItems.kt index 2d2a6351..265c416d 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/model/SettingsColumnItems.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/model/SettingsColumnItems.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.settings.ui.model +package com.stslex.wizard.feature.settings.ui.model import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ExitToApp diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStore.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt similarity index 66% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStore.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt index 7b7ae544..4a7cfa44 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStore.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt @@ -1,14 +1,14 @@ -package com.stslex.feature.settings.ui.store +package com.stslex.wizard.feature.settings.ui.store -import com.stslex.core.core.AppDispatcher -import com.stslex.core.ui.mvi.Store -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar -import com.stslex.feature.settings.domain.SettingsInteractor -import com.stslex.feature.settings.navigation.SettingsRouter -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Action -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Event -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.Navigation -import com.stslex.feature.settings.ui.store.SettingsStoreComponent.State +import com.stslex.wizard.core.core.AppDispatcher +import com.stslex.wizard.core.ui.mvi.Store +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.feature.settings.domain.SettingsInteractor +import com.stslex.wizard.feature.settings.navigation.SettingsRouter +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Action +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Event +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.Navigation +import com.stslex.wizard.feature.settings.ui.store.SettingsStoreComponent.State class SettingsStore( private val interactor: SettingsInteractor, diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStoreComponent.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreComponent.kt similarity index 81% rename from feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStoreComponent.kt rename to feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreComponent.kt index 47dbf856..55e6a7d7 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/feature/settings/ui/store/SettingsStoreComponent.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreComponent.kt @@ -1,8 +1,8 @@ -package com.stslex.feature.settings.ui.store +package com.stslex.wizard.feature.settings.ui.store import androidx.compose.runtime.Stable -import com.stslex.core.ui.mvi.StoreComponent -import com.stslex.core.ui.mvi.StoreComponent.Event.Snackbar +import com.stslex.wizard.core.ui.mvi.StoreComponent +import com.stslex.wizard.core.ui.mvi.StoreComponent.Event.Snackbar interface SettingsStoreComponent : StoreComponent { diff --git a/feature/settings/src/test/java/com/stslex/feature/settings/ExampleUnitTest.kt b/feature/settings/src/test/java/com/stslex/wizard/feature/settings/ExampleUnitTest.kt similarity index 87% rename from feature/settings/src/test/java/com/stslex/feature/settings/ExampleUnitTest.kt rename to feature/settings/src/test/java/com/stslex/wizard/feature/settings/ExampleUnitTest.kt index 4e63a596..61609b8d 100644 --- a/feature/settings/src/test/java/com/stslex/feature/settings/ExampleUnitTest.kt +++ b/feature/settings/src/test/java/com/stslex/wizard/feature/settings/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.stslex.feature.settings +package com.stslex.wizard.feature.settings import org.junit.Test diff --git a/gradle.properties b/gradle.properties index 9e526444..dc33e0f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,9 @@ -kotlin.code.style=official - #Gradle org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" - - -#Compose -org.jetbrains.compose.experimental.uikit.enabled=true - +org.gradle.caching=true +org.gradle.configuration-cache=true +#Kotlin +kotlin.code.style=official #Android android.useAndroidX=true -android.nonTransitiveRClass=true - -#MPP -kotlin.mpp.androidSourceSetLayoutVersion=2 -kotlin.mpp.enableCInteropCommonization=true - -#Development -development=true \ No newline at end of file +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 80e7e3b7..3ffce114 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,74 +1,80 @@ [versions] -kotlin = "1.9.23" -compose-plugin = "1.6.10-beta01" +kotlin = "2.0.20" +agp = "8.5.2" +compose-plugin = "1.7.0" + +minSdk = "24" +compileSdk = "34" +targetSdk = "34" +versionName = "1.0" +versionCode = "1" + +androidx-activityCompose = "1.9.3" +compose-material3 = "1.3.0" +android-compose = "1.7.4" +material = "1.12.0" + +ksp = "2.0.20-1.0.25" # https://github.com/google/ksp/releases +room = "2.7.0-alpha10" +sqlite = "2.5.0-alpha07" +koin = "3.5.6" +koin-compose = "1.1.5" +koin-ksp = "1.3.1" -android-minSdk = "24" -android-compileSdk = "34" -android-targetSdk = "34" - -logback = "1.4.11" -androidCompose = "1.6.7" compose-compiler = "1.5.4" -agp = "8.2.2" -androidx-activityCompose = "1.9.0" -androidx-core-ktx = "1.13.1" -androidx-appcompat = "1.6.1" -androidx-material = "1.12.0" -androidx-constraintlayout = "2.1.4" -androidx-test-junit = "1.1.5" -androidx-espresso-core = "3.5.1" junit = "4.13.2" -koin = "3.4.3" -koin-compose = "1.0.4" ktor = "2.3.6" immutableCollection = "0.3.5" -coroutines = "1.8.0" +coroutine = "1.8.1" voyagerVersion = "1.0.0-rc10" -kermit = "2.0.2" +kermit = "2.0.3" kamel = "0.9.0" coil = "2.5.0" +navigation = "2.8.0-alpha10" +lifecycle = "2.8.2" +mockito = "2.19.0" +multiplatformSettings = "1.1.1" +serialization = "1.7.1" buildConfig = "4.2.0" -lifecycleRuntimeKtx = "2.8.0" -androixComposeBom = "2024.05.00" [libraries] -kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } -kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } -junit = { group = "junit", name = "junit", version.ref = "junit" } - -compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidCompose" } -compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidCompose" } -compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidCompose" } -compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "androidCompose" } -compose-material = { module = "androidx.compose.material:material", version.ref = "androidCompose" } - -androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" } -androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" } -androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" } -androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" } -androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" } -androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" } -androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" } +android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } +kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +compose-gradlePlugin = { module = "org.jetbrains.compose:org.jetbrains.compose.gradle.plugin", version.ref = "compose-plugin" } +ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } +room-gradlePlugin = { group = "androidx.room", name = "room-gradle-plugin", version.ref = "room" } -#TODO add for tests -#koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" } -koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } -koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin-compose" } -koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" } +coroutine-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutine" } +coroutine-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutine" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" } +android-material = { module = "com.google.android.material:material", version.ref = "material" } +compose-ui = { module = "androidx.compose.ui:ui", version.ref = "android-compose" } +compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "android-compose" } +compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "android-compose" } +compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "android-compose" } +compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } +compose-navigation = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigation" } + +koin-core = { group = "io.insert-koin", name = "koin-core", version.ref = "koin" } +koin-android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" } +koin-android-compose = { group = "io.insert-koin", name = "koin-androidx-compose", version.ref = "koin" } +koin-ksp-compiler = { group = "io.insert-koin", name = "koin-ksp-compiler", version.ref = "koin-ksp" } +koin-annotations = { group = "io.insert-koin", name = "koin-annotations", version.ref = "koin-ksp" } +koin-compose = { group = "io.insert-koin", name = "koin-compose", version.ref = "koin-compose" } + +ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyagerVersion" } voyager-koin = { module = "cafe.adriel.voyager:voyager-koin", version.ref = "voyagerVersion" } voyager-tab-navigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyagerVersion" } voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyagerVersion" } kamel = { module = "media.kamel:kamel-image", version.ref = "kamel" } +coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } kermit = { module = "co.touchlab:kermit", version.ref = "kermit" } - -#todo check if this is needed -logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } - +multiplatformSettings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatformSettings" } kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "immutableCollection" } ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } @@ -78,31 +84,46 @@ ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "k ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } ktor-client-auth = { group = "io.ktor", name = "ktor-client-auth", version.ref = "ktor" } -kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.0" } +lifecycle-viewmodel = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version = "1.7.9" } -coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } -coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } - -coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } -androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } -androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androixComposeBom" } -androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } -androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } -androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } -androidx-material3 = { group = "androidx.compose.material3", name = "material3" } +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } +koin-test = { group = "io.insert-koin", name = "koin-test" } +koin-test-junit = { group = "io.insert-koin", name = "koin-test-junit4" } +coroutine-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version = "1.8.0" } +mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" } +junit = { group = "junit", name = "junit", version.ref = "junit" } [plugins] -kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } androidApplication = { id = "com.android.application", version.ref = "agp" } androidLibrary = { id = "com.android.library", version.ref = "agp" } +kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } -kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } +composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } buildConfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildConfig" } + +convention-kmp-library = { id = "convention.kmp.library", version = "1.0" } +convention-kmp-library-compose = { id = "convention.kmp.library.compose", version = "1.0" } +convention-kmp-application = { id = "convention.kmp.application", version = "1.0" } +convention-android-library-compose = { id = "convention.android.library.compose", version = "1.0" } +convention-kmp-library-room = { id = "convention.kmp.library.room", version = "1.0" } + +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +room = { id = "androidx.room", version.ref = "room" } +serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } + [bundles] +test = [ + "kotlin-test", + "koin-test", + "koin-test-junit", + "coroutine-test", + "mockito", + "junit" +] voyager = [ "voyager-navigator", "voyager-koin", diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f862..b82aa23a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/iosApp/CoreDatabasePodfile b/iosApp/CoreDatabasePodfile deleted file mode 100644 index da33868f..00000000 --- a/iosApp/CoreDatabasePodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'database', :path => '../core/database' -end \ No newline at end of file diff --git a/iosApp/CoreNetworkPodfile b/iosApp/CoreNetworkPodfile deleted file mode 100644 index 5ebded95..00000000 --- a/iosApp/CoreNetworkPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'network', :path => '../core/network' -end \ No newline at end of file diff --git a/iosApp/CorePodfile b/iosApp/CorePodfile deleted file mode 100644 index 2b49fcb6..00000000 --- a/iosApp/CorePodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'core', :path => '../core/core' -end \ No newline at end of file diff --git a/iosApp/CoreUiPodfile b/iosApp/CoreUiPodfile deleted file mode 100644 index cc29659a..00000000 --- a/iosApp/CoreUiPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'ui', :path => '../core/ui' -end \ No newline at end of file diff --git a/iosApp/FeatureAuthPodfile b/iosApp/FeatureAuthPodfile deleted file mode 100644 index 562e49c4..00000000 --- a/iosApp/FeatureAuthPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'auth', :path => '../feature/auth' -end \ No newline at end of file diff --git a/iosApp/FeatureFavouritePodfile b/iosApp/FeatureFavouritePodfile deleted file mode 100644 index e0f2e57b..00000000 --- a/iosApp/FeatureFavouritePodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'favourite', :path => '../feature/favourite' -end \ No newline at end of file diff --git a/iosApp/FeatureFilmFeedPodfile b/iosApp/FeatureFilmFeedPodfile deleted file mode 100644 index cef10daa..00000000 --- a/iosApp/FeatureFilmFeedPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'film_feed', :path => '../feature/film_feed' -end \ No newline at end of file diff --git a/iosApp/FeatureFilmPodfile b/iosApp/FeatureFilmPodfile deleted file mode 100644 index 7718b211..00000000 --- a/iosApp/FeatureFilmPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'film', :path => '../feature/film' -end \ No newline at end of file diff --git a/iosApp/FeatureFollowerPodfile b/iosApp/FeatureFollowerPodfile deleted file mode 100644 index a202bb8c..00000000 --- a/iosApp/FeatureFollowerPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'film', :path => '../feature/follower' -end \ No newline at end of file diff --git a/iosApp/FeatureMatchFeedPodfile b/iosApp/FeatureMatchFeedPodfile deleted file mode 100644 index d9e75513..00000000 --- a/iosApp/FeatureMatchFeedPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'match_feed', :path => '../feature/match_feed' -end \ No newline at end of file diff --git a/iosApp/FeatureMatchPodfile b/iosApp/FeatureMatchPodfile deleted file mode 100644 index 6bc04454..00000000 --- a/iosApp/FeatureMatchPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'match', :path => '../feature/match' -end \ No newline at end of file diff --git a/iosApp/FeatureProfilePodfile b/iosApp/FeatureProfilePodfile deleted file mode 100644 index 80b6e423..00000000 --- a/iosApp/FeatureProfilePodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'profile', :path => '../feature/profile' -end \ No newline at end of file diff --git a/iosApp/FeatureSettingsPodfile b/iosApp/FeatureSettingsPodfile deleted file mode 100644 index ccf52ada..00000000 --- a/iosApp/FeatureSettingsPodfile +++ /dev/null @@ -1,5 +0,0 @@ -target 'test' do - use_frameworks! - platform :ios, '16.0' - pod 'settings', :path => '../feature/settings' -end \ No newline at end of file diff --git a/iosApp/Podfile b/iosApp/Podfile index bc5d3a3d..c563bc6f 100644 --- a/iosApp/Podfile +++ b/iosApp/Podfile @@ -1,5 +1,5 @@ target 'iosApp' do use_frameworks! platform :ios, '16.0' - pod 'composeApp', :path => '../composeApp' + pod 'commonApp', :path => '../commonApp' end diff --git a/iosApp/Podfile.lock b/iosApp/Podfile.lock new file mode 100644 index 00000000..fb8e5f00 --- /dev/null +++ b/iosApp/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - commonApp (1.0) + +DEPENDENCIES: + - commonApp (from `../commonApp`) + +EXTERNAL SOURCES: + commonApp: + :path: "../commonApp" + +SPEC CHECKSUMS: + commonApp: afad773cab43251ce14a9e6d5a8c093d660ff158 + +PODFILE CHECKSUM: aa2972d1382df09e3220d2773dab6c4366dc7ec0 + +COCOAPODS: 1.15.2 diff --git a/iosApp/Pods/Local Podspecs/commonApp.podspec.json b/iosApp/Pods/Local Podspecs/commonApp.podspec.json new file mode 100644 index 00000000..233d6c3d --- /dev/null +++ b/iosApp/Pods/Local Podspecs/commonApp.podspec.json @@ -0,0 +1,34 @@ +{ + "name": "commonApp", + "version": "1.0", + "homepage": "Link to the Shared Module homepage", + "source": { + "http": "" + }, + "authors": "", + "license": "", + "summary": "Some description for the Shared Module", + "vendored_frameworks": "build/cocoapods/framework/commonApp.framework", + "libraries": "c++", + "platforms": { + "ios": "16.0" + }, + "xcconfig": { + "ENABLE_USER_SCRIPT_SANDBOXING": "NO" + }, + "pod_target_xcconfig": { + "KOTLIN_PROJECT_PATH": ":commonApp", + "PRODUCT_MODULE_NAME": "commonApp" + }, + "script_phases": [ + { + "name": "Build commonApp", + "execution_position": "before_compile", + "shell_path": "/bin/sh", + "script": " if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n" + } + ], + "resources": [ + "build/compose/cocoapods/compose-resources" + ] +} diff --git a/iosApp/Pods/Manifest.lock b/iosApp/Pods/Manifest.lock new file mode 100644 index 00000000..fb8e5f00 --- /dev/null +++ b/iosApp/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - commonApp (1.0) + +DEPENDENCIES: + - commonApp (from `../commonApp`) + +EXTERNAL SOURCES: + commonApp: + :path: "../commonApp" + +SPEC CHECKSUMS: + commonApp: afad773cab43251ce14a9e6d5a8c093d660ff158 + +PODFILE CHECKSUM: aa2972d1382df09e3220d2773dab6c4366dc7ec0 + +COCOAPODS: 1.15.2 diff --git a/iosApp/Pods/Pods.xcodeproj/project.pbxproj b/iosApp/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 00000000..bcf7d443 --- /dev/null +++ b/iosApp/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,557 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 60CD729CEF3BE74848D72FFA01C9B6A3 /* commonApp */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 786D7CE6BBA519E4B7B8E823702C6D6A /* Build configuration list for PBXAggregateTarget "commonApp" */; + buildPhases = ( + 73960FA937B051037B378EB9E1FE6042 /* [CP-User] Build commonApp */, + ); + dependencies = ( + ); + name = commonApp; + productName = commonApp; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 000F6764CC3611909F5588C4DD324091 /* Pods-iosApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3ECE25B7023450AFB38D1C1068760386 /* Pods-iosApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */; }; + C82986791CF939F1BFA0A183A7160DF2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 647FD4C4DC8F4287B9819258FCE0FFAD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 60CD729CEF3BE74848D72FFA01C9B6A3; + remoteInfo = commonApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 257390D34074D2442461A69FE6970CBD /* Pods-iosApp-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-iosApp-resources.sh"; sourceTree = ""; }; + 4D3E6DCB9CAB65A8A05C467E2BBC1F0D /* Pods-iosApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-iosApp-acknowledgements.markdown"; sourceTree = ""; }; + 6094F47CD28E1D0CDB842E3689152602 /* commonApp.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = commonApp.framework; path = build/cocoapods/framework/commonApp.framework; sourceTree = ""; }; + 6A3C5EB0586A09C512019B6B6A2DE103 /* Pods-iosApp-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iosApp-Info.plist"; sourceTree = ""; }; + 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-iosApp-umbrella.h"; sourceTree = ""; }; + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-iosApp-dummy.m"; sourceTree = ""; }; + 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iosApp.release.xcconfig"; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + AA1464A163D75B93E1F0C066308CA546 /* commonApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = commonApp.debug.xcconfig; sourceTree = ""; }; + B097DD7534E741D5C41838011D755842 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C6F99CDB9787D5217AAF36EE2319D997 /* commonApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = commonApp.release.xcconfig; sourceTree = ""; }; + D314930E0FC41FC18905DE2B710F7584 /* compose-resources */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder; name = "compose-resources"; path = "build/compose/cocoapods/compose-resources"; sourceTree = ""; }; + D5FA86A534462753757F698CA7821471 /* commonApp.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = commonApp.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + F6DF6FB4000E345BDEE186C956C36ABF /* Pods-iosApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-iosApp-acknowledgements.plist"; sourceTree = ""; }; + F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; + FB978CA3A69A4DEF4DC035E9CD8D83A4 /* Pods-iosApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-iosApp.modulemap"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 17D20EE9B9E5CEE47277F2FDB453040B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C82986791CF939F1BFA0A183A7160DF2 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 11C970DEAE48C6D0282DFE54684F53F1 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 4C16E8CC03E90AF9CABF8C82B813AE97 /* Pods-iosApp */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 1F86AA6785DF34AFD5A71790761717DE /* Products */ = { + isa = PBXGroup; + children = ( + B097DD7534E741D5C41838011D755842 /* Pods_iosApp.framework */, + ); + name = Products; + sourceTree = ""; + }; + 2215BDF6C0CEAA4E32FBBBA41E5BA98C /* Support Files */ = { + isa = PBXGroup; + children = ( + AA1464A163D75B93E1F0C066308CA546 /* commonApp.debug.xcconfig */, + C6F99CDB9787D5217AAF36EE2319D997 /* commonApp.release.xcconfig */, + ); + name = "Support Files"; + path = "../iosApp/Pods/Target Support Files/commonApp"; + sourceTree = ""; + }; + 4C16E8CC03E90AF9CABF8C82B813AE97 /* Pods-iosApp */ = { + isa = PBXGroup; + children = ( + FB978CA3A69A4DEF4DC035E9CD8D83A4 /* Pods-iosApp.modulemap */, + 4D3E6DCB9CAB65A8A05C467E2BBC1F0D /* Pods-iosApp-acknowledgements.markdown */, + F6DF6FB4000E345BDEE186C956C36ABF /* Pods-iosApp-acknowledgements.plist */, + 9BC3BD8CAFAE0C8EB92CD04E5FC24E61 /* Pods-iosApp-dummy.m */, + 6A3C5EB0586A09C512019B6B6A2DE103 /* Pods-iosApp-Info.plist */, + 257390D34074D2442461A69FE6970CBD /* Pods-iosApp-resources.sh */, + 70E8DFC7821955063C886C71258CBE53 /* Pods-iosApp-umbrella.h */, + F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */, + 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */, + ); + name = "Pods-iosApp"; + path = "Target Support Files/Pods-iosApp"; + sourceTree = ""; + }; + 578452D2E740E91742655AC8F1636D1F /* iOS */ = { + isa = PBXGroup; + children = ( + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 755A85A12736417D95BFCF4CAB738584 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6094F47CD28E1D0CDB842E3689152602 /* commonApp.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A292FF6B1EC0EB703D1790918125860C /* commonApp */ = { + isa = PBXGroup; + children = ( + D314930E0FC41FC18905DE2B710F7584 /* compose-resources */, + 755A85A12736417D95BFCF4CAB738584 /* Frameworks */, + CDCC3C4001D10B49FD3E2B3200D95D95 /* Pod */, + 2215BDF6C0CEAA4E32FBBBA41E5BA98C /* Support Files */, + ); + name = commonApp; + path = ../../commonApp; + sourceTree = ""; + }; + C99673C477C4703A405F3D1AB03F2108 /* Development Pods */ = { + isa = PBXGroup; + children = ( + A292FF6B1EC0EB703D1790918125860C /* commonApp */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + CDCC3C4001D10B49FD3E2B3200D95D95 /* Pod */ = { + isa = PBXGroup; + children = ( + D5FA86A534462753757F698CA7821471 /* commonApp.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + C99673C477C4703A405F3D1AB03F2108 /* Development Pods */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + 1F86AA6785DF34AFD5A71790761717DE /* Products */, + 11C970DEAE48C6D0282DFE54684F53F1 /* Targets Support Files */, + ); + sourceTree = ""; + }; + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 578452D2E740E91742655AC8F1636D1F /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + ECACD39E7139F61236E116CC2E146EAF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 000F6764CC3611909F5588C4DD324091 /* Pods-iosApp-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + ED39C638569286489CD697A6C8964146 /* Pods-iosApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9E387E0E5841F9BB2027399BC86D473C /* Build configuration list for PBXNativeTarget "Pods-iosApp" */; + buildPhases = ( + ECACD39E7139F61236E116CC2E146EAF /* Headers */, + 2E8732F641A2D00F489BFA7FFD57E4D3 /* Sources */, + 17D20EE9B9E5CEE47277F2FDB453040B /* Frameworks */, + E8F07320B073641AC684CCA20E85289F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8DBA9698B7BE43D55D3A928E1DD8AA9A /* PBXTargetDependency */, + ); + name = "Pods-iosApp"; + productName = Pods_iosApp; + productReference = B097DD7534E741D5C41838011D755842 /* Pods_iosApp.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 1F86AA6785DF34AFD5A71790761717DE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 60CD729CEF3BE74848D72FFA01C9B6A3 /* commonApp */, + ED39C638569286489CD697A6C8964146 /* Pods-iosApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E8F07320B073641AC684CCA20E85289F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 73960FA937B051037B378EB9E1FE6042 /* [CP-User] Build commonApp */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] Build commonApp"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = " if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=\"$CONFIGURATION\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2E8732F641A2D00F489BFA7FFD57E4D3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3ECE25B7023450AFB38D1C1068760386 /* Pods-iosApp-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8DBA9698B7BE43D55D3A928E1DD8AA9A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = commonApp; + target = 60CD729CEF3BE74848D72FFA01C9B6A3 /* commonApp */; + targetProxy = 647FD4C4DC8F4287B9819258FCE0FFAD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 216BBF18FCF9A80E3F8B8B29DFDADEAF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA1464A163D75B93E1F0C066308CA546 /* commonApp.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = NO; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2DF8E4235D00A0C8073049FDEBAA1F24 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C6F99CDB9787D5217AAF36EE2319D997 /* commonApp.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = NO; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 30E0B9EFD9A5C45D0D351231E81B30B3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + AA7BF216A54CB6899256610845D3F513 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9C49AEBC7AA7C80C03295804C6F07963 /* Pods-iosApp.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ""; + INFOPLIST_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SYMROOT = ""; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D2CF5CA5371D717A3073A132FE4EA080 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F981EE0C95E2DFD40CA16F05D2C35B8A /* Pods-iosApp.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ""; + INFOPLIST_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-iosApp/Pods-iosApp.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SYMROOT = ""; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + F4FF6A0D1970CA9705974E3CB2134802 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F4FF6A0D1970CA9705974E3CB2134802 /* Debug */, + 30E0B9EFD9A5C45D0D351231E81B30B3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 786D7CE6BBA519E4B7B8E823702C6D6A /* Build configuration list for PBXAggregateTarget "commonApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 216BBF18FCF9A80E3F8B8B29DFDADEAF /* Debug */, + 2DF8E4235D00A0C8073049FDEBAA1F24 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9E387E0E5841F9BB2027399BC86D473C /* Build configuration list for PBXNativeTarget "Pods-iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D2CF5CA5371D717A3073A132FE4EA080 /* Debug */, + AA7BF216A54CB6899256610845D3F513 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist new file mode 100644 index 00000000..19cf209d --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.markdown b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.markdown new file mode 100644 index 00000000..102af753 --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.plist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.plist new file mode 100644 index 00000000..7acbad1e --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-dummy.m b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-dummy.m new file mode 100644 index 00000000..e1bcef40 --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_iosApp : NSObject +@end +@implementation PodsDummy_Pods_iosApp +@end diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-input-files.xcfilelist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-input-files.xcfilelist new file mode 100644 index 00000000..4c7ceb5c --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh +${PODS_ROOT}/../../commonApp/build/compose/cocoapods/compose-resources \ No newline at end of file diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-output-files.xcfilelist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-output-files.xcfilelist new file mode 100644 index 00000000..383ba86c --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Debug-output-files.xcfilelist @@ -0,0 +1 @@ +${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/compose-resources \ No newline at end of file diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-input-files.xcfilelist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-input-files.xcfilelist new file mode 100644 index 00000000..4c7ceb5c --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh +${PODS_ROOT}/../../commonApp/build/compose/cocoapods/compose-resources \ No newline at end of file diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-output-files.xcfilelist b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-output-files.xcfilelist new file mode 100644 index 00000000..383ba86c --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources-Release-output-files.xcfilelist @@ -0,0 +1 @@ +${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/compose-resources \ No newline at end of file diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh new file mode 100755 index 00000000..0d1c1d66 --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh @@ -0,0 +1,129 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_resource "${PODS_ROOT}/../../commonApp/build/compose/cocoapods/compose-resources" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_resource "${PODS_ROOT}/../../commonApp/build/compose/cocoapods/compose-resources" +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-umbrella.h b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-umbrella.h new file mode 100644 index 00000000..a3d60345 --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_iosAppVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_iosAppVersionString[]; + diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig new file mode 100644 index 00000000..23bb1e4d --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +ENABLE_USER_SCRIPT_SANDBOXING = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../commonApp/build/cocoapods/framework" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "commonApp" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.modulemap b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.modulemap new file mode 100644 index 00000000..1bb57b29 --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.modulemap @@ -0,0 +1,6 @@ +framework module Pods_iosApp { + umbrella header "Pods-iosApp-umbrella.h" + + export * + module * { export * } +} diff --git a/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig new file mode 100644 index 00000000..23bb1e4d --- /dev/null +++ b/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +ENABLE_USER_SCRIPT_SANDBOXING = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../commonApp/build/cocoapods/framework" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "commonApp" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iosApp/Pods/Target Support Files/commonApp/commonApp.debug.xcconfig b/iosApp/Pods/Target Support Files/commonApp/commonApp.debug.xcconfig new file mode 100644 index 00000000..01de16fb --- /dev/null +++ b/iosApp/Pods/Target Support Files/commonApp/commonApp.debug.xcconfig @@ -0,0 +1,17 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/commonApp +ENABLE_USER_SCRIPT_SANDBOXING = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../commonApp/build/cocoapods/framework" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +KOTLIN_PROJECT_PATH = :commonApp +OTHER_LDFLAGS = $(inherited) -l"c++" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../commonApp +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +PRODUCT_MODULE_NAME = commonApp +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iosApp/Pods/Target Support Files/commonApp/commonApp.release.xcconfig b/iosApp/Pods/Target Support Files/commonApp/commonApp.release.xcconfig new file mode 100644 index 00000000..01de16fb --- /dev/null +++ b/iosApp/Pods/Target Support Files/commonApp/commonApp.release.xcconfig @@ -0,0 +1,17 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/commonApp +ENABLE_USER_SCRIPT_SANDBOXING = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../commonApp/build/cocoapods/framework" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +KOTLIN_PROJECT_PATH = :commonApp +OTHER_LDFLAGS = $(inherited) -l"c++" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../commonApp +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +PRODUCT_MODULE_NAME = commonApp +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index daa798d2..edc6a3e9 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -10,21 +10,21 @@ 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; }; 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; + 7060AF59C539360F7FB222E8 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E5942D806DB392857A697D6 /* Pods_iosApp.framework */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - FE4FFD1975178F8DA26D72A0 /* Pods_iosApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFA1133E2B311A4C18FC3ACB /* Pods_iosApp.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 0E5942D806DB392857A697D6 /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = ""; }; + 2AEEA457657696548A5A8AF1 /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; + 3FCD7C524F1FEF7D048841FB /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; 7555FF7B242A565900829871 /* Wizard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wizard.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = ""; }; - D4DE30BF7A2AA3FEB6F8E245 /* Pods-iosApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.debug.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig"; sourceTree = ""; }; - E26F3EA180743070F8E9CC1D /* Pods-iosApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iosApp.release.xcconfig"; path = "Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig"; sourceTree = ""; }; - FFA1133E2B311A4C18FC3ACB /* Pods_iosApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iosApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +32,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FE4FFD1975178F8DA26D72A0 /* Pods_iosApp.framework in Frameworks */, + 7060AF59C539360F7FB222E8 /* Pods_iosApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,14 +47,6 @@ path = "Preview Content"; sourceTree = ""; }; - 6FCE8C5BA98419B4BB08DBFB /* Frameworks */ = { - isa = PBXGroup; - children = ( - FFA1133E2B311A4C18FC3ACB /* Pods_iosApp.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 7555FF72242A565900829871 = { isa = PBXGroup; children = ( @@ -62,7 +54,7 @@ 7555FF7D242A565900829871 /* iosApp */, 7555FF7C242A565900829871 /* Products */, C79109892AE20DEF2E47CF3C /* Pods */, - 6FCE8C5BA98419B4BB08DBFB /* Frameworks */, + CE4C9640BF8CC4251A965E2F /* Frameworks */, ); sourceTree = ""; }; @@ -97,12 +89,20 @@ C79109892AE20DEF2E47CF3C /* Pods */ = { isa = PBXGroup; children = ( - D4DE30BF7A2AA3FEB6F8E245 /* Pods-iosApp.debug.xcconfig */, - E26F3EA180743070F8E9CC1D /* Pods-iosApp.release.xcconfig */, + 3FCD7C524F1FEF7D048841FB /* Pods-iosApp.debug.xcconfig */, + 2AEEA457657696548A5A8AF1 /* Pods-iosApp.release.xcconfig */, ); path = Pods; sourceTree = ""; }; + CE4C9640BF8CC4251A965E2F /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0E5942D806DB392857A697D6 /* Pods_iosApp.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -110,12 +110,12 @@ isa = PBXNativeTarget; buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; buildPhases = ( - 7645D6F94DE9E3A54810075D /* [CP] Check Pods Manifest.lock */, + C7C2E26ED6CDBA91A31A597A /* [CP] Check Pods Manifest.lock */, F36B1CEB2AD83DDC00CB74D5 /* Compile Kotlin Framework */, 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, 5A8430C927B9746E8C838DEE /* Frameworks */, - 5F26829D0D2B5FDCA4D4251F /* [CP] Copy Pods Resources */, + 4E37FF9BD199E5DE8E41C079 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -172,7 +172,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 5F26829D0D2B5FDCA4D4251F /* [CP] Copy Pods Resources */ = { + 4E37FF9BD199E5DE8E41C079 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -189,7 +189,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 7645D6F94DE9E3A54810075D /* [CP] Check Pods Manifest.lock */ = { + C7C2E26ED6CDBA91A31A597A /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -227,7 +227,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :commonApp:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -364,7 +364,7 @@ }; 7555FFA6242A565B00829871 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D4DE30BF7A2AA3FEB6F8E245 /* Pods-iosApp.debug.xcconfig */; + baseConfigurationReference = 3FCD7C524F1FEF7D048841FB /* Pods-iosApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -374,7 +374,7 @@ ENABLE_PREVIEWS = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", - "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", + "$(SRCROOT)/../commonApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", ); INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; @@ -385,7 +385,7 @@ OTHER_LDFLAGS = ( "$(inherited)", "-framework", - composeApp, + commonApp, ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; @@ -397,7 +397,7 @@ }; 7555FFA7242A565B00829871 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E26F3EA180743070F8E9CC1D /* Pods-iosApp.release.xcconfig */; + baseConfigurationReference = 2AEEA457657696548A5A8AF1 /* Pods-iosApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; @@ -407,7 +407,7 @@ ENABLE_PREVIEWS = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", - "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", + "$(SRCROOT)/../commonApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", ); INFOPLIST_FILE = iosApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.1; @@ -418,7 +418,7 @@ OTHER_LDFLAGS = ( "$(inherited)", "-framework", - composeApp, + commonApp, ); PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}"; PRODUCT_NAME = "${APP_NAME}"; diff --git a/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift index 3cd5c325..f94c8813 100644 --- a/iosApp/iosApp/ContentView.swift +++ b/iosApp/iosApp/ContentView.swift @@ -1,6 +1,5 @@ -import UIKit import SwiftUI -import ComposeApp +import commonApp struct ComposeView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> UIViewController { @@ -15,7 +14,4 @@ struct ContentView: View { ComposeView() .ignoresSafeArea(.keyboard) // Compose has own keyboard handler } -} - - - +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index bf1fa0b1..043796f3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,9 +1,7 @@ -rootProject.name = "Wizard" enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") - pluginManagement { + includeBuild("build-logic") repositories { - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") google() gradlePluginPortal() mavenCentral() @@ -14,16 +12,19 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") } } -include(":composeApp") +rootProject.name = "Wizard" + +include(":iosApp") +include(":commonApp") include(":core:core") include(":core:network") include(":core:ui") include(":core:database") + include(":feature:film_feed") include(":feature:film") include(":feature:profile")