From 399bfc9498e95bf5b0a8e11f08967a486c29bc73 Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Mon, 5 Jan 2026 15:59:59 +0200 Subject: [PATCH 01/12] Update to Kotlin 2.3.0. Update KSP version and add new gradle property for general KMP optimizations --- gradle.properties | 6 +++++- gradle/libs.versions.toml | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6f8e6ea6..be9a3754 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,8 @@ org.gradle.caching=true #Android android.nonTransitiveRClass=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true + +#KMP +# https://kotlinlang.org/docs/mpp-share-on-platforms.html#use-native-libraries-in-the-hierarchical-structure +kotlin.mpp.enableCInteropCommonization=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7789d998..01b19dbe 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,8 +2,8 @@ # Build tools agp = "8.11.1" composeBom = "2025.07.00" -kotlin = "2.2.0" -ksp = "2.2.0-2.0.2" +kotlin = "2.3.0" +ksp = "2.3.4" google-services = "4.4.3" conveyor = "1.12" From fcf02695db6a7be661cd8fe40d436e66c2cc6dfc Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Thu, 8 Jan 2026 15:55:50 +0200 Subject: [PATCH 02/12] Upgrade AGP and androidTools to minimum required for new plugin: com.android.kotlin.multiplatform.library (Kotlin version already exceeds min of 2.2.0-Beta2) --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 01b19dbe..689cc598 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # Build tools -agp = "8.11.1" +agp = "8.12.3" composeBom = "2025.07.00" kotlin = "2.3.0" ksp = "2.3.4" @@ -8,7 +8,7 @@ google-services = "4.4.3" conveyor = "1.12" androidDesugarJdkLibs = "2.1.5" -androidTools = "31.12.0" +androidTools = "31.12.0-alpha04" # Compose compose-hot-reload = "1.0.0-beta04" From 503ad349c02e308dedd31ffcf8b3469d949dedf8 Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Thu, 8 Jan 2026 16:12:50 +0200 Subject: [PATCH 03/12] Swop com.android.library plugin for new com.android.kotlin.multiplatform.library plugin and replace the configuration blocks --- .../main/kotlin/CmpLibraryConventionPlugin.kt | 3 +- .../main/kotlin/KmpLibraryConventionPlugin.kt | 15 +-------- .../chirp/convention/KotlinAndroidTarget.kt | 33 +++++++++++++++++++ .../chirp/convention/KotlinMultiplatform.kt | 7 +--- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt index cec5b7d9..9855c966 100644 --- a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt @@ -19,7 +19,8 @@ class CmpLibraryConventionPlugin: Plugin { "commonMainImplementation"(libs.findLibrary("jetbrains-compose-material3").get()) "commonMainImplementation"(libs.findLibrary("jetbrains-compose-material-icons-core").get()) - "debugImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) + // Single-variant model: use androidMainImplementation instead of debugImplementation + "androidMainImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) } } } diff --git a/build-logic/convention/src/main/kotlin/KmpLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/KmpLibraryConventionPlugin.kt index db0d641b..d79072d1 100644 --- a/build-logic/convention/src/main/kotlin/KmpLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/KmpLibraryConventionPlugin.kt @@ -1,11 +1,7 @@ -import com.android.build.api.dsl.LibraryExtension -import com.plcoding.chirp.convention.configureKotlinAndroid import com.plcoding.chirp.convention.configureKotlinMultiplatform import com.plcoding.chirp.convention.libs -import com.plcoding.chirp.convention.pathToResourcePrefix import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies class KmpLibraryConventionPlugin: Plugin { @@ -13,22 +9,13 @@ class KmpLibraryConventionPlugin: Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - apply("com.android.library") + apply("com.android.kotlin.multiplatform.library") apply("org.jetbrains.kotlin.multiplatform") apply("org.jetbrains.kotlin.plugin.serialization") } configureKotlinMultiplatform() - extensions.configure { - configureKotlinAndroid(this) - - resourcePrefix = this@with.pathToResourcePrefix() - - // Required to make debug build of app run in iOS simulator - experimentalProperties["android.experimental.kmp.enableAndroidResources"] = "true" - } - dependencies { "commonMainImplementation"(libs.findLibrary("kotlinx-serialization-json").get()) "commonTestImplementation"(libs.findLibrary("kotlin-test").get()) diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt index 47f7b739..0f75cbe3 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt @@ -1,11 +1,17 @@ package com.plcoding.chirp.convention +import com.android.build.api.dsl.androidLibrary import org.gradle.api.Project import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.dependencies import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +/** + * Configures Android target for APPLICATION modules using com.android.application plugin. + * Uses the traditional androidTarget {} DSL. + */ internal fun Project.configureAndroidTarget() { extensions.configure { androidTarget { @@ -15,4 +21,31 @@ internal fun Project.configureAndroidTarget() { } } } +} + +/** + * Configures Android target for LIBRARY modules using com.android.kotlin.multiplatform.library plugin. + * Uses the new androidLibrary {} DSL. + */ +internal fun Project.configureAndroidLibraryTarget() { + extensions.configure { + androidLibrary { + namespace = this@configureAndroidLibraryTarget.pathToPackageName() + compileSdk = libs.findVersion("projectCompileSdkVersion").get().toString().toInt() + minSdk = libs.findVersion("projectMinSdkVersion").get().toString().toInt() + + // Enable Android resources (replaces experimental property) + androidResources { + enable = true + } + + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + } + + dependencies { + "coreLibraryDesugaring"(libs.findLibrary("android-desugarJdkLibs").get()) + } } \ No newline at end of file diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt index 70e74324..fcab0619 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt @@ -1,16 +1,11 @@ package com.plcoding.chirp.convention -import com.android.build.api.dsl.LibraryExtension import org.gradle.api.Project import org.gradle.kotlin.dsl.configure import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension internal fun Project.configureKotlinMultiplatform() { - extensions.configure { - namespace = this@configureKotlinMultiplatform.pathToPackageName() - } - - configureAndroidTarget() + configureAndroidLibraryTarget() configureDesktopTarget() extensions.configure { From 588f8584b9202be6ba9a5095136d3d819ae61546 Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Wed, 7 Jan 2026 15:52:59 +0200 Subject: [PATCH 04/12] Fix the source set hierarchy template to prepare for AGP 9.0 --- .../chirp/convention/HierarchyTemplate.kt | 20 ++++++++++++++----- core/data/build.gradle.kts | 13 +++++++++--- core/presentation/build.gradle.kts | 13 ++++++++---- feature/chat/presentation/build.gradle.kts | 2 ++ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/HierarchyTemplate.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/HierarchyTemplate.kt index d4cf644a..657a6a0f 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/HierarchyTemplate.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/HierarchyTemplate.kt @@ -16,6 +16,14 @@ private val hierarchyTemplate = KotlinHierarchyTemplate { common { withCompilations { true } + /* + AGP 9.0 Prep: + jvmCommon was removed because Android belonged to both mobile and jvmCommon, + creating overlapping source-set paths. With the new AGP KMP plugin, this ambiguity + forces actuals to exist in all intermediate source sets, leading to compilation + errors. Removing jvmCommon globally avoids this conflict, while modules that truly + need Android + Desktop JVM sharing can opt in explicitly using dependsOn(). + */ group("mobile") { withAndroidTarget() group("ios") { @@ -23,11 +31,13 @@ private val hierarchyTemplate = KotlinHierarchyTemplate { } } - group("jvmCommon") { - withAndroidTarget() - withJvm() - } - + /* + Android no longer automatically depends on intermediate source sets such as + mobileMain or jvmCommonMain, and jvmCommonMain has been removed from the global + hierarchy. As of Gradle 9.0, any module that needs to share code between Android + and Desktop JVM must explicitly configure this dependency, for example by + making androidMain depend on jvmCommonMain. + */ group("native") { withNative() diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 08a5c5d4..9b1bc6b2 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -28,16 +28,23 @@ kotlin { } } - desktopMain { + // Create jvmCommonMain for shared JVM code between Android and Desktop + val jvmCommonMain by creating { + dependsOn(commonMain.get()) + } + + androidMain { + dependsOn(jvmCommonMain) dependencies { implementation(libs.ktor.client.okhttp) + implementation(libs.koin.android) } } - androidMain { + desktopMain { + dependsOn(jvmCommonMain) dependencies { implementation(libs.ktor.client.okhttp) - implementation(libs.koin.android) } } diff --git a/core/presentation/build.gradle.kts b/core/presentation/build.gradle.kts index bee280c1..2163f0a8 100644 --- a/core/presentation/build.gradle.kts +++ b/core/presentation/build.gradle.kts @@ -24,10 +24,15 @@ kotlin { } } - mobileMain.dependencies { - implementation(libs.moko.permissions) - implementation(libs.moko.permissions.compose) - implementation(libs.moko.permissions.notifications) + val mobileMain by getting { + dependencies { + implementation(libs.moko.permissions) + implementation(libs.moko.permissions.compose) + implementation(libs.moko.permissions.notifications) + } + } + androidMain { + dependsOn(mobileMain) } } diff --git a/feature/chat/presentation/build.gradle.kts b/feature/chat/presentation/build.gradle.kts index 76b75283..47d469b5 100644 --- a/feature/chat/presentation/build.gradle.kts +++ b/feature/chat/presentation/build.gradle.kts @@ -28,7 +28,9 @@ kotlin { } } + val mobileMain by getting androidMain { + dependsOn(mobileMain) dependencies { // Add Android-specific dependencies here. Note that this source set depends on // commonMain by default and will correctly pull the Android artifacts of any KMP From 03f73ab5ec2e232c445bfd37292f3754ef61fc6f Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Thu, 8 Jan 2026 17:52:28 +0200 Subject: [PATCH 05/12] Migrate to Gradle 9 and Android KMP library plugin Update AGP to 9.0.0-rc02, Compose Multiplatform to 1.9.3, and migrate all library modules to com.android.kotlin.multiplatform.library plugin with direct androidLibrary {} configuration. --- .../chirp/convention/AndroidCompose.kt | 6 +++--- .../chirp/convention/KotlinAndroid.kt | 6 +++--- .../chirp/convention/KotlinAndroidTarget.kt | 21 ++----------------- core/data/build.gradle.kts | 6 ++++++ core/designsystem/build.gradle.kts | 6 ++++++ core/domain/build.gradle.kts | 6 ++++++ core/presentation/build.gradle.kts | 6 ++++++ feature/auth/domain/build.gradle.kts | 6 ++++++ feature/auth/presentation/build.gradle.kts | 6 ++++++ feature/chat/data/build.gradle.kts | 6 ++++++ feature/chat/database/build.gradle.kts | 6 ++++++ feature/chat/domain/build.gradle.kts | 6 ++++++ feature/chat/presentation/build.gradle.kts | 6 ++++++ gradle.properties | 12 ++++++++++- gradle/libs.versions.toml | 6 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 16 files changed, 83 insertions(+), 30 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/AndroidCompose.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/AndroidCompose.kt index 7d989d5b..ca9d627c 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/AndroidCompose.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/AndroidCompose.kt @@ -1,13 +1,13 @@ package com.plcoding.chirp.convention -import com.android.build.api.dsl.CommonExtension +import com.android.build.api.dsl.ApplicationExtension import org.gradle.api.Project import org.gradle.kotlin.dsl.dependencies internal fun Project.configureAndroidCompose( - commonExtension: CommonExtension<*, *, *, *, *, *> + extension: ApplicationExtension ) { - with(commonExtension) { + with(extension) { buildFeatures { compose = true } diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroid.kt index b9def9bb..a139defb 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroid.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroid.kt @@ -1,6 +1,6 @@ package com.plcoding.chirp.convention -import com.android.build.api.dsl.CommonExtension +import com.android.build.api.dsl.ApplicationExtension import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.kotlin.dsl.dependencies @@ -9,9 +9,9 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile internal fun Project.configureKotlinAndroid( - commonExtension: CommonExtension<*, *, *, *, *, *> + extension: ApplicationExtension ) { - with(commonExtension) { + with(extension) { compileSdk = libs.findVersion("projectCompileSdkVersion").get().toString().toInt() defaultConfig.minSdk = libs.findVersion("projectMinSdkVersion").get().toString().toInt() diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt index 0f75cbe3..8c782dc0 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinAndroidTarget.kt @@ -1,6 +1,5 @@ package com.plcoding.chirp.convention -import com.android.build.api.dsl.androidLibrary import org.gradle.api.Project import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies @@ -25,26 +24,10 @@ internal fun Project.configureAndroidTarget() { /** * Configures Android target for LIBRARY modules using com.android.kotlin.multiplatform.library plugin. - * Uses the new androidLibrary {} DSL. + * Android library settings (namespace, compileSdk, minSdk) must be configured in each module's + * build.gradle.kts using kotlin { androidLibrary { ... } } */ internal fun Project.configureAndroidLibraryTarget() { - extensions.configure { - androidLibrary { - namespace = this@configureAndroidLibraryTarget.pathToPackageName() - compileSdk = libs.findVersion("projectCompileSdkVersion").get().toString().toInt() - minSdk = libs.findVersion("projectMinSdkVersion").get().toString().toInt() - - // Enable Android resources (replaces experimental property) - androidResources { - enable = true - } - - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } - } - } - dependencies { "coreLibraryDesugaring"(libs.findLibrary("android-desugarJdkLibs").get()) } diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 9b1bc6b2..93c13576 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -4,6 +4,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.data" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index 3ea6a2d1..20c99e2f 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.designsystem" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 7252b2f7..cab77283 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/presentation/build.gradle.kts b/core/presentation/build.gradle.kts index 2163f0a8..0193e929 100644 --- a/core/presentation/build.gradle.kts +++ b/core/presentation/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.presentation" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/auth/domain/build.gradle.kts b/feature/auth/domain/build.gradle.kts index d94bc787..a29793db 100644 --- a/feature/auth/domain/build.gradle.kts +++ b/feature/auth/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.auth.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/auth/presentation/build.gradle.kts b/feature/auth/presentation/build.gradle.kts index 22b7c137..cb953607 100644 --- a/feature/auth/presentation/build.gradle.kts +++ b/feature/auth/presentation/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.auth.presentation" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/data/build.gradle.kts b/feature/chat/data/build.gradle.kts index 43d4d755..7bd65191 100644 --- a/feature/chat/data/build.gradle.kts +++ b/feature/chat/data/build.gradle.kts @@ -6,6 +6,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.data" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/database/build.gradle.kts b/feature/chat/database/build.gradle.kts index b4cc151f..739c2a5f 100644 --- a/feature/chat/database/build.gradle.kts +++ b/feature/chat/database/build.gradle.kts @@ -4,6 +4,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.database" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/domain/build.gradle.kts b/feature/chat/domain/build.gradle.kts index f5645083..9edf8f15 100644 --- a/feature/chat/domain/build.gradle.kts +++ b/feature/chat/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/presentation/build.gradle.kts b/feature/chat/presentation/build.gradle.kts index 47d469b5..db609e43 100644 --- a/feature/chat/presentation/build.gradle.kts +++ b/feature/chat/presentation/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.presentation" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/gradle.properties b/gradle.properties index be9a3754..51372afe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,4 +13,14 @@ android.useAndroidX=true #KMP # https://kotlinlang.org/docs/mpp-share-on-platforms.html#use-native-libraries-in-the-hierarchical-structure -kotlin.mpp.enableCInteropCommonization=true \ No newline at end of file +kotlin.mpp.enableCInteropCommonization=true +android.defaults.buildfeatures.resvalues=true +android.sdk.defaultTargetSdkToCompileSdkIfUnset=false +android.enableAppCompileTimeRClass=false +android.usesSdkInManifest.disallowed=false +android.uniquePackageNames=false +android.dependency.useConstraints=true +android.r8.strictFullModeForKeepRules=false +android.r8.optimizedResourceShrinking=false +android.builtInKotlin=false +android.newDsl=false \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 689cc598..e41c5fd7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # Build tools -agp = "8.12.3" +agp = "9.0.0-rc02" composeBom = "2025.07.00" kotlin = "2.3.0" ksp = "2.3.4" @@ -8,11 +8,11 @@ google-services = "4.4.3" conveyor = "1.12" androidDesugarJdkLibs = "2.1.5" -androidTools = "31.12.0-alpha04" +androidTools = "32.0.0-rc02" # Compose compose-hot-reload = "1.0.0-beta04" -compose-multiplatform = "1.9.0-beta01" +compose-multiplatform = "1.9.3" # Maintain compose multiplatform version aligned with navigation, cache error could happen compose-lifecycle = "2.9.1" navigation-compose = "2.9.0-beta04" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 83d0dd6b..a2978837 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ #Thu Aug 07 18:15:15 CEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 0bc1705b2e78d089ed8775c5d84ffd511129699c Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Fri, 9 Jan 2026 07:08:04 +0200 Subject: [PATCH 06/12] Removed gradle properties added by IDE Upgrade Assistant. Added context to two key properties --- gradle.properties | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 51372afe..95e2de13 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,13 +14,8 @@ android.useAndroidX=true #KMP # https://kotlinlang.org/docs/mpp-share-on-platforms.html#use-native-libraries-in-the-hierarchical-structure kotlin.mpp.enableCInteropCommonization=true -android.defaults.buildfeatures.resvalues=true -android.sdk.defaultTargetSdkToCompileSdkIfUnset=false -android.enableAppCompileTimeRClass=false -android.usesSdkInManifest.disallowed=false -android.uniquePackageNames=false -android.dependency.useConstraints=true -android.r8.strictFullModeForKeepRules=false -android.r8.optimizedResourceShrinking=false -android.builtInKotlin=false -android.newDsl=false \ No newline at end of file + +# New DSL removes `BaseExtensions`API +android.newDsl=false +# https://developer.android.com/build/migrate-to-built-in-kotlin +android.builtInKotlin=false \ No newline at end of file From 5999b0d0931de9ba7dc5aec7bde580b07b8b3d69 Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Fri, 9 Jan 2026 16:42:44 +0200 Subject: [PATCH 07/12] Restructure project for AGP 9.0 compatibility Separate Android application from KMP module to fix the deprecation warning about org.jetbrains.kotlin.multiplatform being incompatible with com.android.application in AGP 9.0. - Create dedicated :androidApp module with com.android.application - Move MainActivity, ChirpApplication, manifest, and res to androidApp - Convert composeApp to use com.android.kotlin.multiplatform.library - Update CmpApplicationConventionPlugin to use library plugin - Add kotlin.android plugin to AndroidApplicationConventionPlugin - Add required dependencies (activity-compose, splashscreen) to androidApp --- androidApp/build.gradle.kts | 18 +++++++ androidApp/google-services.json | 29 ++++++++++ androidApp/src/main/AndroidManifest.xml | 50 ++++++++++++++++++ .../com/plcoding/chirp/ChirpApplication.kt | 0 .../kotlin/com/plcoding/chirp/MainActivity.kt | 0 .../drawable-v24/ic_launcher_foreground.xml | 0 .../res/drawable/ic_launcher_background.xml | 0 .../src/main}/res/drawable/logo_light.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../src/main}/res/mipmap-hdpi/ic_launcher.png | Bin .../mipmap-hdpi/ic_launcher_background.png | Bin .../mipmap-hdpi/ic_launcher_foreground.png | Bin .../mipmap-hdpi/ic_launcher_monochrome.png | Bin .../src/main}/res/mipmap-mdpi/ic_launcher.png | Bin .../mipmap-mdpi/ic_launcher_background.png | Bin .../mipmap-mdpi/ic_launcher_foreground.png | Bin .../mipmap-mdpi/ic_launcher_monochrome.png | Bin .../main}/res/mipmap-xhdpi/ic_launcher.png | Bin .../mipmap-xhdpi/ic_launcher_background.png | Bin .../mipmap-xhdpi/ic_launcher_foreground.png | Bin .../mipmap-xhdpi/ic_launcher_monochrome.png | Bin .../main}/res/mipmap-xxhdpi/ic_launcher.png | Bin .../mipmap-xxhdpi/ic_launcher_background.png | Bin .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxhdpi/ic_launcher_monochrome.png | Bin .../main}/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../mipmap-xxxhdpi/ic_launcher_background.png | Bin .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin .../mipmap-xxxhdpi/ic_launcher_monochrome.png | Bin .../src/main}/res/values/splash.xml | 0 .../src/main}/res/values/strings.xml | 0 .../AndroidApplicationConventionPlugin.kt | 1 + .../kotlin/CmpApplicationConventionPlugin.kt | 17 ++++-- build.gradle.kts | 1 + composeApp/build.gradle.kts | 11 ++-- .../src/androidMain/AndroidManifest.xml | 50 +----------------- gradle/libs.versions.toml | 2 + settings.gradle.kts | 1 + 38 files changed, 123 insertions(+), 57 deletions(-) create mode 100644 androidApp/build.gradle.kts create mode 100644 androidApp/google-services.json create mode 100644 androidApp/src/main/AndroidManifest.xml rename {composeApp/src/androidMain => androidApp/src/main}/kotlin/com/plcoding/chirp/ChirpApplication.kt (100%) rename {composeApp/src/androidMain => androidApp/src/main}/kotlin/com/plcoding/chirp/MainActivity.kt (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/drawable-v24/ic_launcher_foreground.xml (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/drawable/ic_launcher_background.xml (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/drawable/logo_light.xml (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-hdpi/ic_launcher.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-hdpi/ic_launcher_background.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-hdpi/ic_launcher_foreground.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-hdpi/ic_launcher_monochrome.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-mdpi/ic_launcher.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-mdpi/ic_launcher_background.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-mdpi/ic_launcher_foreground.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-mdpi/ic_launcher_monochrome.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xhdpi/ic_launcher.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xhdpi/ic_launcher_background.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xhdpi/ic_launcher_foreground.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xhdpi/ic_launcher_monochrome.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxhdpi/ic_launcher_background.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxhdpi/ic_launcher_foreground.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxhdpi/ic_launcher_monochrome.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxxhdpi/ic_launcher_background.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxxhdpi/ic_launcher_foreground.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/mipmap-xxxhdpi/ic_launcher_monochrome.png (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/values/splash.xml (100%) rename {composeApp/src/androidMain => androidApp/src/main}/res/values/strings.xml (100%) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts new file mode 100644 index 00000000..b15fe147 --- /dev/null +++ b/androidApp/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + alias(libs.plugins.convention.android.application.compose) + alias(libs.plugins.google.services) + alias(libs.plugins.kotlin.android) +} + +dependencies { + implementation(projects.composeApp) + implementation(libs.koin.android) + implementation(libs.core.splashscreen) + implementation(libs.core.ktx) + implementation(libs.androidx.activity.compose) +} +android { + kotlinOptions { + jvmTarget = "17" + } +} diff --git a/androidApp/google-services.json b/androidApp/google-services.json new file mode 100644 index 00000000..9d950ed3 --- /dev/null +++ b/androidApp/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "26272713399", + "project_id": "chirp-a7cf5", + "storage_bucket": "chirp-a7cf5.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:26272713399:android:21ae2ed7274e681f7d1b32", + "android_client_info": { + "package_name": "com.plcoding.chirp" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAHJIlCgyuZMhr-UBicqMxi5mTCsd5FgTs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml new file mode 100644 index 00000000..65810d08 --- /dev/null +++ b/androidApp/src/main/AndroidManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/composeApp/src/androidMain/kotlin/com/plcoding/chirp/ChirpApplication.kt b/androidApp/src/main/kotlin/com/plcoding/chirp/ChirpApplication.kt similarity index 100% rename from composeApp/src/androidMain/kotlin/com/plcoding/chirp/ChirpApplication.kt rename to androidApp/src/main/kotlin/com/plcoding/chirp/ChirpApplication.kt diff --git a/composeApp/src/androidMain/kotlin/com/plcoding/chirp/MainActivity.kt b/androidApp/src/main/kotlin/com/plcoding/chirp/MainActivity.kt similarity index 100% rename from composeApp/src/androidMain/kotlin/com/plcoding/chirp/MainActivity.kt rename to androidApp/src/main/kotlin/com/plcoding/chirp/MainActivity.kt diff --git a/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml rename to androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml b/androidApp/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from composeApp/src/androidMain/res/drawable/ic_launcher_background.xml rename to androidApp/src/main/res/drawable/ic_launcher_background.xml diff --git a/composeApp/src/androidMain/res/drawable/logo_light.xml b/androidApp/src/main/res/drawable/logo_light.xml similarity index 100% rename from composeApp/src/androidMain/res/drawable/logo_light.xml rename to androidApp/src/main/res/drawable/logo_light.xml diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/values/splash.xml b/androidApp/src/main/res/values/splash.xml similarity index 100% rename from composeApp/src/androidMain/res/values/splash.xml rename to androidApp/src/main/res/values/splash.xml diff --git a/composeApp/src/androidMain/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml similarity index 100% rename from composeApp/src/androidMain/res/values/strings.xml rename to androidApp/src/main/res/values/strings.xml diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index cb87df85..644a0f27 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -11,6 +11,7 @@ class AndroidApplicationConventionPlugin: Plugin { with(target) { with(pluginManager) { apply("com.android.application") + apply("org.jetbrains.kotlin.android") } extensions.configure { diff --git a/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt index 7a82c6d9..5229785d 100644 --- a/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt @@ -1,5 +1,5 @@ import com.plcoding.chirp.convention.applyHierarchyTemplate -import com.plcoding.chirp.convention.configureAndroidTarget +import com.plcoding.chirp.convention.configureAndroidLibraryTarget import com.plcoding.chirp.convention.configureDesktopTarget import com.plcoding.chirp.convention.configureIosTargets import com.plcoding.chirp.convention.libs @@ -9,19 +9,27 @@ import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +/** + * Convention plugin for Compose Multiplatform "application" modules. + * + * AGP 9.0 Compatibility: + * This plugin now uses com.android.kotlin.multiplatform.library instead of com.android.application. + * The actual Android application entry point (MainActivity, Application class) should be in a + * separate :androidApp module that depends on the module using this plugin. + */ class CmpApplicationConventionPlugin: Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - apply("com.plcoding.convention.android.application.compose") + apply("com.android.kotlin.multiplatform.library") apply("org.jetbrains.kotlin.multiplatform") apply("org.jetbrains.compose") apply("org.jetbrains.kotlin.plugin.compose") apply("org.jetbrains.kotlin.plugin.serialization") } - configureAndroidTarget() + configureAndroidLibraryTarget() configureIosTargets() configureDesktopTarget() @@ -30,7 +38,8 @@ class CmpApplicationConventionPlugin: Plugin { } dependencies { - "debugImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) + // Single-variant model: use androidMainImplementation instead of debugImplementation + "androidMainImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) } } } diff --git a/build.gradle.kts b/build.gradle.kts index 1277d3b3..8b38dffc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,4 +13,5 @@ plugins { alias(libs.plugins.room) apply false alias(libs.plugins.google.services) apply false alias(libs.plugins.conveyor) apply false + alias(libs.plugins.kotlin.android) apply false } \ No newline at end of file diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 195ab9be..9aee550d 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,21 +1,22 @@ plugins { alias(libs.plugins.convention.cmp.application) alias(libs.plugins.compose.hot.reload) - alias(libs.plugins.google.services) alias(libs.plugins.conveyor) } version = "1.0.0" kotlin { + androidLibrary { + namespace = "com.plcoding.chirp.shared" + compileSdk = 36 + minSdk = 26 + } + sourceSets { androidMain.dependencies { implementation(compose.preview) implementation(libs.androidx.activity.compose) - - implementation(libs.core.splashscreen) - - implementation(libs.koin.android) } commonMain.dependencies { implementation(projects.core.data) diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml index 65810d08..ca41639a 100644 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -1,50 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e41c5fd7..9423a962 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -63,6 +63,7 @@ desktopPackageVersion = "1.0.0" runner = "1.7.0" junit = "1.3.0" jsystemthemedetector = "3.9.1" +coreKtx = "1.17.0" [libraries] # Kotlin @@ -173,6 +174,7 @@ jetbrains-savedstate = { module = "org.jetbrains.androidx.savedstate:savedstate" jetbrains-bundle = { module = "org.jetbrains.androidx.core:core-bundle", version.ref = "jetbrains-core-bundle" } androidx-runner = { group = "androidx.test", name = "runner", version.ref = "runner" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" } +core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } [plugins] convention-android-application = { id = "com.plcoding.convention.android.application", version = "unspecified" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 289f7db8..cc3e47c0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,6 +34,7 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } +include(":androidApp") include(":composeApp") include(":core:presentation") include(":core:domain") From a1b67f9a13254855549d4abf668a08ef92bc9a3b Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Fri, 9 Jan 2026 16:59:43 +0200 Subject: [PATCH 08/12] Migrate to AGP 9.0 built-in Kotlin support Remove deprecated kotlin.android plugin usage now that AGP 9.0 has built-in Kotlin compilation support. - Remove android.newDsl=false and android.builtInKotlin=false from gradle.properties - Remove kotlin.android plugin from AndroidApplicationConventionPlugin - Remove kotlinOptions block from androidApp (handled by convention plugin) --- androidApp/build.gradle.kts | 6 ------ .../src/main/kotlin/AndroidApplicationConventionPlugin.kt | 2 +- gradle.properties | 7 +------ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index b15fe147..e8997ff6 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -1,7 +1,6 @@ plugins { alias(libs.plugins.convention.android.application.compose) alias(libs.plugins.google.services) - alias(libs.plugins.kotlin.android) } dependencies { @@ -11,8 +10,3 @@ dependencies { implementation(libs.core.ktx) implementation(libs.androidx.activity.compose) } -android { - kotlinOptions { - jvmTarget = "17" - } -} diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt index 644a0f27..6f72e9fd 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt @@ -11,7 +11,7 @@ class AndroidApplicationConventionPlugin: Plugin { with(target) { with(pluginManager) { apply("com.android.application") - apply("org.jetbrains.kotlin.android") + // AGP 9.0+ has built-in Kotlin support, no need for kotlin.android plugin } extensions.configure { diff --git a/gradle.properties b/gradle.properties index 95e2de13..be9a3754 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,9 +13,4 @@ android.useAndroidX=true #KMP # https://kotlinlang.org/docs/mpp-share-on-platforms.html#use-native-libraries-in-the-hierarchical-structure -kotlin.mpp.enableCInteropCommonization=true - -# New DSL removes `BaseExtensions`API -android.newDsl=false -# https://developer.android.com/build/migrate-to-built-in-kotlin -android.builtInKotlin=false \ No newline at end of file +kotlin.mpp.enableCInteropCommonization=true \ No newline at end of file From 27315524d6b07cae69a804618977e6cf655c8fe9 Mon Sep 17 00:00:00 2001 From: Philipp Lackner <53933333+philipplackner@users.noreply.github.com> Date: Thu, 15 Jan 2026 17:34:24 +0100 Subject: [PATCH 09/12] Fix Gradle 9 compiler warnings --- androidApp/google-services.json | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 androidApp/google-services.json diff --git a/androidApp/google-services.json b/androidApp/google-services.json deleted file mode 100644 index 9d950ed3..00000000 --- a/androidApp/google-services.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "project_info": { - "project_number": "26272713399", - "project_id": "chirp-a7cf5", - "storage_bucket": "chirp-a7cf5.firebasestorage.app" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:26272713399:android:21ae2ed7274e681f7d1b32", - "android_client_info": { - "package_name": "com.plcoding.chirp" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "AIzaSyAHJIlCgyuZMhr-UBicqMxi5mTCsd5FgTs" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file From 3467964c658f93157638228c07dd5c1e613d37a5 Mon Sep 17 00:00:00 2001 From: Philipp Lackner Date: Mon, 19 Jan 2026 11:21:19 +0100 Subject: [PATCH 10/12] Add google-services.json to .gitignore and update to Gradle 9.0.0 --- .gitignore | 1 + gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a5c688d9..10f262ad 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ captures **/xcshareddata/WorkspaceSettings.xcsettings iosApp/iosApp/GoogleService-Info.plist +androidApp/google-services.json output \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9423a962..f34809d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # Build tools -agp = "9.0.0-rc02" +agp = "9.0.0" composeBom = "2025.07.00" kotlin = "2.3.0" ksp = "2.3.4" From 6bd6fa409988588558dd4a17704cbe2b0a6fb75f Mon Sep 17 00:00:00 2001 From: Philipp Lackner Date: Mon, 19 Jan 2026 11:45:52 +0100 Subject: [PATCH 11/12] Move androidLibrary into convention plugin --- .../src/main/kotlin/CmpLibraryConventionPlugin.kt | 3 +++ .../com/plcoding/chirp/convention/KotlinMultiplatform.kt | 7 +++++++ build.gradle.kts | 1 - composeApp/build.gradle.kts | 4 ---- composeApp/src/androidMain/AndroidManifest.xml | 4 ---- core/data/build.gradle.kts | 5 ----- core/designsystem/build.gradle.kts | 6 ------ core/domain/build.gradle.kts | 6 ------ core/presentation/build.gradle.kts | 6 ------ feature/auth/domain/build.gradle.kts | 6 ------ feature/auth/presentation/build.gradle.kts | 6 ------ feature/chat/data/build.gradle.kts | 6 ------ feature/chat/database/build.gradle.kts | 6 ------ feature/chat/domain/build.gradle.kts | 6 ------ feature/chat/presentation/build.gradle.kts | 5 ----- 15 files changed, 10 insertions(+), 67 deletions(-) delete mode 100644 composeApp/src/androidMain/AndroidManifest.xml diff --git a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt index 9855c966..b3fc5ccb 100644 --- a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt @@ -1,3 +1,4 @@ +import com.plcoding.chirp.convention.configureAndroidLibraryTarget import com.plcoding.chirp.convention.libs import org.gradle.api.Plugin import org.gradle.api.Project @@ -13,6 +14,8 @@ class CmpLibraryConventionPlugin: Plugin { apply("org.jetbrains.compose") } + configureAndroidLibraryTarget() + dependencies { "commonMainImplementation"(libs.findLibrary("jetbrains-compose-ui").get()) "commonMainImplementation"(libs.findLibrary("jetbrains-compose-foundation").get()) diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt index fcab0619..731a002c 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt @@ -1,5 +1,6 @@ package com.plcoding.chirp.convention +import com.android.build.api.dsl.KotlinMultiplatformAndroidLibraryExtension import org.gradle.api.Project import org.gradle.kotlin.dsl.configure import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension @@ -19,6 +20,12 @@ internal fun Project.configureKotlinMultiplatform() { } } + extensions.configure { + minSdk = 26 + compileSdk = 36 + namespace = pathToPackageName() + } + applyHierarchyTemplate() compilerOptions { diff --git a/build.gradle.kts b/build.gradle.kts index 8b38dffc..1277d3b3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,5 +13,4 @@ plugins { alias(libs.plugins.room) apply false alias(libs.plugins.google.services) apply false alias(libs.plugins.conveyor) apply false - alias(libs.plugins.kotlin.android) apply false } \ No newline at end of file diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 9aee550d..96f404c0 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -14,10 +14,6 @@ kotlin { } sourceSets { - androidMain.dependencies { - implementation(compose.preview) - implementation(libs.androidx.activity.compose) - } commonMain.dependencies { implementation(projects.core.data) implementation(projects.core.domain) diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml deleted file mode 100644 index ca41639a..00000000 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 93c13576..1afca923 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -4,11 +4,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.core.data" - compileSdk = 36 - minSdk = 26 - } // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index 20c99e2f..3ea6a2d1 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.core.designsystem" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index cab77283..7252b2f7 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.core.domain" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/presentation/build.gradle.kts b/core/presentation/build.gradle.kts index 0193e929..2163f0a8 100644 --- a/core/presentation/build.gradle.kts +++ b/core/presentation/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.core.presentation" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/auth/domain/build.gradle.kts b/feature/auth/domain/build.gradle.kts index a29793db..d94bc787 100644 --- a/feature/auth/domain/build.gradle.kts +++ b/feature/auth/domain/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.auth.domain" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/auth/presentation/build.gradle.kts b/feature/auth/presentation/build.gradle.kts index cb953607..22b7c137 100644 --- a/feature/auth/presentation/build.gradle.kts +++ b/feature/auth/presentation/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.auth.presentation" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/data/build.gradle.kts b/feature/chat/data/build.gradle.kts index 7bd65191..43d4d755 100644 --- a/feature/chat/data/build.gradle.kts +++ b/feature/chat/data/build.gradle.kts @@ -6,12 +6,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.chat.data" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/database/build.gradle.kts b/feature/chat/database/build.gradle.kts index 739c2a5f..b4cc151f 100644 --- a/feature/chat/database/build.gradle.kts +++ b/feature/chat/database/build.gradle.kts @@ -4,12 +4,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.chat.database" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/domain/build.gradle.kts b/feature/chat/domain/build.gradle.kts index 9edf8f15..f5645083 100644 --- a/feature/chat/domain/build.gradle.kts +++ b/feature/chat/domain/build.gradle.kts @@ -3,12 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.chat.domain" - compileSdk = 36 - minSdk = 26 - } - // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/presentation/build.gradle.kts b/feature/chat/presentation/build.gradle.kts index db609e43..341dd377 100644 --- a/feature/chat/presentation/build.gradle.kts +++ b/feature/chat/presentation/build.gradle.kts @@ -3,11 +3,6 @@ plugins { } kotlin { - androidLibrary { - namespace = "com.plcoding.feature.chat.presentation" - compileSdk = 36 - minSdk = 26 - } // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the From 3231cb4b186c17301cf2c6e032e3b5660b5e774f Mon Sep 17 00:00:00 2001 From: Kai Cilliers Date: Thu, 22 Jan 2026 05:59:40 +0200 Subject: [PATCH 12/12] Migrate to Compose Multiplatform 1.10.0 and fix AGP 9.0 compatibility - Update Compose Multiplatform from 1.9.3 to 1.10.0 - Update AGP from 9.0.0 to 9.0.0-rc02 - Update compose-lifecycle to 2.10.0-alpha06 - Update navigation-compose to 2.9.1 - Update adaptive to 1.3.0-alpha02 - Remove compose-hot-reload plugin (no longer needed) - Add explicit compose-resources and ui-tooling-preview dependencies (now separate modules in CMP 1.10.0) - Remove centralized KotlinMultiplatformAndroidLibraryExtension config from convention plugin - Add androidLibrary blocks with namespace/SDK config to all modules - Update Preview import from org.jetbrains.compose to androidx.compose - Update resource imports to use new packageOfResClass pattern --- build-logic/convention/build.gradle.kts | 1 + .../kotlin/CmpApplicationConventionPlugin.kt | 12 ++++++- .../main/kotlin/CmpLibraryConventionPlugin.kt | 10 +++--- .../chirp/convention/KotlinMultiplatform.kt | 12 +++---- build.gradle.kts | 2 +- composeApp/build.gradle.kts | 19 ++++++----- .../kotlin/com/plcoding/chirp/App.kt | 2 +- .../com/plcoding/chirp/ChirpTrayMenu.kt | 6 ++-- .../com/plcoding/chirp/windows/ChirpWindow.kt | 10 +++--- core/data/build.gradle.kts | 5 +++ core/designsystem/build.gradle.kts | 14 ++++++-- .../components/avatar/ChirpAvatarPhoto.kt | 2 +- .../components/avatar/ChirpStackedAvatars.kt | 2 +- .../components/brand/ChirpBrandLogo.kt | 4 +-- .../components/brand/ChirpFailureIcon.kt | 4 +-- .../components/brand/ChirpSuccessIcon.kt | 4 +-- .../components/buttons/ChirpButton.kt | 2 +- .../buttons/ChirpFloatingActionButton.kt | 2 +- .../components/buttons/ChirpIconButton.kt | 2 +- .../components/chat/ChirpChatBubble.kt | 2 +- .../dialogs/DestructiveConfirmationDialog.kt | 6 ++-- .../layouts/ChirpAdaptiveFormLayout.kt | 2 +- .../layouts/ChirpAdaptiveResultLayout.kt | 2 +- .../layouts/ChirpSimpleResultLayout.kt | 2 +- .../components/layouts/ChirpSurface.kt | 6 ++-- .../textfields/ChirpMultiLineTextField.kt | 2 +- .../textfields/ChirpPasswordTextField.kt | 12 +++---- .../components/textfields/ChirpTextField.kt | 2 +- .../plcoding/core/designsystem/theme/Type.kt | 12 +++---- core/domain/build.gradle.kts | 6 ++++ core/presentation/build.gradle.kts | 16 +++++++-- .../presentation/util/DataErrorToUiText.kt | 18 ++-------- feature/auth/domain/build.gradle.kts | 6 ++++ feature/auth/presentation/build.gradle.kts | 17 ++++++++-- .../EmailVerificationScreen.kt | 18 +++++----- .../forgot_password/ForgotPasswordScreen.kt | 14 ++++---- .../auth/presentation/login/LoginScreen.kt | 18 +++++----- .../auth/presentation/login/LoginViewModel.kt | 6 ++-- .../presentation/register/RegisterScreen.kt | 24 ++++++------- .../register/RegisterViewModel.kt | 10 +++--- .../register_success/RegisterSuccessScreen.kt | 14 ++++---- .../reset_password/ResetPasswordScreen.kt | 14 ++++---- .../reset_password/ResetPasswordViewModel.kt | 6 ++-- feature/chat/data/build.gradle.kts | 6 ++++ feature/chat/database/build.gradle.kts | 6 ++++ feature/chat/domain/build.gradle.kts | 6 ++++ feature/chat/presentation/build.gradle.kts | 16 +++++++-- .../chat_detail/ChatDetailScreen.kt | 8 ++--- .../chat_detail/ChatDetailViewModel.kt | 4 +-- .../components/ChatDetailHeader.kt | 22 ++++++------ .../components/LocalUserMessage.kt | 10 +++--- .../chat_detail/components/MessageBox.kt | 10 +++--- .../chat_detail/components/MessageList.kt | 8 ++--- .../components/MessageListItemUi.kt | 2 +- .../chat_detail/components/MessageStatusUi.kt | 12 +++---- .../presentation/chat_list/ChatListScreen.kt | 18 +++++----- .../chat_list/components/ChatListHeader.kt | 16 ++++----- .../chat_list/components/ChatListItemUi.kt | 8 ++--- .../components/ChatItemHeaderRow.kt | 8 ++--- .../ChatParticipantSearchTextSection.kt | 6 ++-- .../presentation/components/EmptySection.kt | 4 +-- .../components/ManageChatHeaderRow.kt | 4 +-- .../manage_chat/ManageChatScreen.kt | 6 ++-- .../create_chat/CreateChatScreen.kt | 4 +-- .../create_chat/CreateChatViewModel.kt | 4 +-- .../manage_chat/ManageChatScreen.kt | 8 ++--- .../manage_chat/ManageChatViewModel.kt | 4 +-- .../presentation/profile/ProfileScreen.kt | 34 +++++++++---------- .../presentation/profile/ProfileViewModel.kt | 8 ++--- .../profile/components/DragAndDropOverlay.kt | 8 ++--- .../components/ProfileHeaderSection.kt | 6 ++-- .../util/ConnectionStateToUiText.kt | 12 +++---- .../chat/presentation/util/DateUtils.kt | 10 +++--- .../rememberImagePickerLauncher.desktop.kt | 4 +-- gradle/libs.versions.toml | 16 +++++---- iosApp/iosApp.xcodeproj/project.pbxproj | 2 +- 76 files changed, 364 insertions(+), 286 deletions(-) diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index 09024c05..20f69877 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { compileOnly(libs.android.tools.common) compileOnly(libs.kotlin.gradlePlugin) compileOnly(libs.compose.gradlePlugin) + compileOnly(libs.jetbrains.compose.gradlePlugin) compileOnly(libs.ksp.gradlePlugin) compileOnly(libs.androidx.room.gradle.plugin) implementation(libs.buildkonfig.gradlePlugin) diff --git a/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt b/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt index 5229785d..a6e3e076 100644 --- a/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/CmpApplicationConventionPlugin.kt @@ -38,8 +38,18 @@ class CmpApplicationConventionPlugin: Plugin { } dependencies { + // Core Compose dependencies + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-runtime").get()) + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-foundation").get()) + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-material3").get()) + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-ui").get()) + + // CMP 1.10.0+: Resources and preview tooling are now separate modules + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-resources").get()) + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-ui-tooling-preview").get()) + // Single-variant model: use androidMainImplementation instead of debugImplementation - "androidMainImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) + "androidMainImplementation"(libs.findLibrary("jetbrains-compose-ui-tooling").get()) } } } diff --git a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt index b3fc5ccb..9b5d946a 100644 --- a/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/CmpLibraryConventionPlugin.kt @@ -1,4 +1,3 @@ -import com.plcoding.chirp.convention.configureAndroidLibraryTarget import com.plcoding.chirp.convention.libs import org.gradle.api.Plugin import org.gradle.api.Project @@ -14,16 +13,19 @@ class CmpLibraryConventionPlugin: Plugin { apply("org.jetbrains.compose") } - configureAndroidLibraryTarget() - dependencies { + // Core Compose dependencies "commonMainImplementation"(libs.findLibrary("jetbrains-compose-ui").get()) "commonMainImplementation"(libs.findLibrary("jetbrains-compose-foundation").get()) "commonMainImplementation"(libs.findLibrary("jetbrains-compose-material3").get()) "commonMainImplementation"(libs.findLibrary("jetbrains-compose-material-icons-core").get()) + // CMP 1.10.0+: Resources and preview tooling are now separate modules + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-resources").get()) + "commonMainImplementation"(libs.findLibrary("jetbrains-compose-ui-tooling-preview").get()) + // Single-variant model: use androidMainImplementation instead of debugImplementation - "androidMainImplementation"(libs.findLibrary("androidx-compose-ui-tooling").get()) + "androidMainImplementation"(libs.findLibrary("jetbrains-compose-ui-tooling").get()) } } } diff --git a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt index 731a002c..0e326e39 100644 --- a/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/plcoding/chirp/convention/KotlinMultiplatform.kt @@ -1,10 +1,14 @@ package com.plcoding.chirp.convention -import com.android.build.api.dsl.KotlinMultiplatformAndroidLibraryExtension import org.gradle.api.Project import org.gradle.kotlin.dsl.configure import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +/** + * Configures Kotlin Multiplatform for library modules. + * Note: Android library settings (namespace, compileSdk, minSdk, androidResources) must be + * configured in each module's build.gradle.kts using kotlin { androidLibrary { ... } } + */ internal fun Project.configureKotlinMultiplatform() { configureAndroidLibraryTarget() configureDesktopTarget() @@ -20,12 +24,6 @@ internal fun Project.configureKotlinMultiplatform() { } } - extensions.configure { - minSdk = 26 - compileSdk = 36 - namespace = pathToPackageName() - } - applyHierarchyTemplate() compilerOptions { diff --git a/build.gradle.kts b/build.gradle.kts index 1277d3b3..a5c0cabe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,6 @@ plugins { // in each subproject's classloader alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false - alias(libs.plugins.compose.hot.reload) apply false alias(libs.plugins.compose.multiplatform) apply false alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.kotlin.multiplatform) apply false @@ -13,4 +12,5 @@ plugins { alias(libs.plugins.room) apply false alias(libs.plugins.google.services) apply false alias(libs.plugins.conveyor) apply false + alias(libs.plugins.kotlin.android) apply false } \ No newline at end of file diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 96f404c0..7971c3f2 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,6 +1,5 @@ plugins { alias(libs.plugins.convention.cmp.application) - alias(libs.plugins.compose.hot.reload) alias(libs.plugins.conveyor) } @@ -11,9 +10,16 @@ kotlin { namespace = "com.plcoding.chirp.shared" compileSdk = 36 minSdk = 26 + + androidResources { + enable = true + } } sourceSets { + androidMain.dependencies { + implementation(libs.androidx.activity.compose) + } commonMain.dependencies { implementation(projects.core.data) implementation(projects.core.domain) @@ -30,13 +36,6 @@ kotlin { implementation(libs.jetbrains.compose.navigation) implementation(libs.bundles.koin.common) - - implementation(compose.runtime) - implementation(compose.foundation) - implementation(compose.material3) - implementation(compose.ui) - implementation(compose.components.resources) - implementation(compose.components.uiToolingPreview) implementation(libs.jetbrains.compose.viewmodel) implementation(libs.jetbrains.lifecycle.compose) } @@ -61,6 +60,10 @@ kotlin { } } +compose.resources { + packageOfResClass = "com.plcoding.chirp" +} + compose.desktop { application { mainClass = "com.plcoding.chirp.MainKt" diff --git a/composeApp/src/commonMain/kotlin/com/plcoding/chirp/App.kt b/composeApp/src/commonMain/kotlin/com/plcoding/chirp/App.kt index d5e85c66..1fda9e83 100644 --- a/composeApp/src/commonMain/kotlin/com/plcoding/chirp/App.kt +++ b/composeApp/src/commonMain/kotlin/com/plcoding/chirp/App.kt @@ -12,7 +12,7 @@ import com.plcoding.chirp.navigation.DeepLinkListener import com.plcoding.chirp.navigation.NavigationRoot import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.presentation.util.ObserveAsEvents -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/ChirpTrayMenu.kt b/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/ChirpTrayMenu.kt index 5db21b63..36d993b4 100644 --- a/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/ChirpTrayMenu.kt +++ b/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/ChirpTrayMenu.kt @@ -7,9 +7,9 @@ import androidx.compose.ui.window.Tray import androidx.compose.ui.window.TrayState import com.plcoding.core.domain.preferences.ThemePreference import org.jetbrains.compose.resources.painterResource -import chirp.composeapp.generated.resources.Res -import chirp.composeapp.generated.resources.app_theme -import chirp.composeapp.generated.resources.logo +import com.plcoding.chirp.Res +import com.plcoding.chirp.app_theme +import com.plcoding.chirp.logo import org.jetbrains.compose.resources.stringResource @Composable diff --git a/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/windows/ChirpWindow.kt b/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/windows/ChirpWindow.kt index e181fad3..bb30a364 100644 --- a/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/windows/ChirpWindow.kt +++ b/composeApp/src/desktopMain/kotlin/com/plcoding/chirp/windows/ChirpWindow.kt @@ -8,11 +8,11 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.window.MenuBar import androidx.compose.ui.window.Window import androidx.compose.ui.window.rememberWindowState -import chirp.composeapp.generated.resources.Res -import chirp.composeapp.generated.resources.file -import chirp.composeapp.generated.resources.logo -import chirp.composeapp.generated.resources.new_window -import chirp.core.designsystem.generated.resources.logo_chirp +import com.plcoding.chirp.Res +import com.plcoding.chirp.file +import com.plcoding.chirp.logo +import com.plcoding.chirp.new_window +import com.plcoding.core.designsystem.logo_chirp import com.plcoding.chirp.App import com.plcoding.chirp.theme.AppTheme import org.jetbrains.compose.resources.painterResource diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 1afca923..93c13576 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -4,6 +4,11 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.data" + compileSdk = 36 + minSdk = 26 + } // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts index 3ea6a2d1..4e19a61b 100644 --- a/core/designsystem/build.gradle.kts +++ b/core/designsystem/build.gradle.kts @@ -3,6 +3,16 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.designsystem" + compileSdk = 36 + minSdk = 26 + + androidResources { + enable = true + } + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is @@ -18,9 +28,6 @@ kotlin { implementation(libs.coil.compose) implementation(libs.coil.network.ktor) - - implementation(compose.components.resources) - implementation(compose.components.uiToolingPreview) } } @@ -47,4 +54,5 @@ kotlin { compose.resources { publicResClass = true + packageOfResClass = "com.plcoding.core.designsystem" } \ No newline at end of file diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpAvatarPhoto.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpAvatarPhoto.kt index ff0ab72c..7ff292fb 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpAvatarPhoto.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpAvatarPhoto.kt @@ -19,7 +19,7 @@ import androidx.compose.ui.unit.dp import coil3.compose.AsyncImage import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview enum class AvatarSize(val dp: Dp) { SMALL(40.dp), LARGE(60.dp) diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpStackedAvatars.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpStackedAvatars.kt index 9f1e44a4..98165116 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpStackedAvatars.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/avatar/ChirpStackedAvatars.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import com.plcoding.core.designsystem.theme.ChirpTheme -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpStackedAvatars( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpBrandLogo.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpBrandLogo.kt index c2351b97..d4b22db2 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpBrandLogo.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpBrandLogo.kt @@ -6,8 +6,8 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.logo_chirp +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.logo_chirp import org.jetbrains.compose.resources.vectorResource @Composable diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpFailureIcon.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpFailureIcon.kt index 818a4ebd..b36bbb6a 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpFailureIcon.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpFailureIcon.kt @@ -6,8 +6,8 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.success_checkmark +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.success_checkmark import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.vectorResource diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpSuccessIcon.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpSuccessIcon.kt index 50e5160a..52a9312c 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpSuccessIcon.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/brand/ChirpSuccessIcon.kt @@ -4,8 +4,8 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.success_checkmark +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.success_checkmark import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.vectorResource diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpButton.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpButton.kt index ce2138da..38b3205b 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpButton.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpButton.kt @@ -22,7 +22,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview enum class ChirpButtonStyle { PRIMARY, diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpFloatingActionButton.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpFloatingActionButton.kt index 791b4b1d..cf7fd6cd 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpFloatingActionButton.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpFloatingActionButton.kt @@ -10,7 +10,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.theme.ChirpTheme -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpFloatingActionButton( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpIconButton.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpIconButton.kt index 683eabb1..b4acc506 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpIconButton.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/buttons/ChirpIconButton.kt @@ -16,7 +16,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpIconButton( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/chat/ChirpChatBubble.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/chat/ChirpChatBubble.kt index 051f2412..2c2991f8 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/chat/ChirpChatBubble.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/chat/ChirpChatBubble.kt @@ -25,7 +25,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpChatBubble( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/dialogs/DestructiveConfirmationDialog.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/dialogs/DestructiveConfirmationDialog.kt index 4de82404..12263407 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/dialogs/DestructiveConfirmationDialog.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/dialogs/DestructiveConfirmationDialog.kt @@ -23,14 +23,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.dismiss_dialog +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.dismiss_dialog import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun DestructiveConfirmationDialog( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveFormLayout.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveFormLayout.kt index b234c9e7..96b7c72e 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveFormLayout.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveFormLayout.kt @@ -32,7 +32,7 @@ import com.plcoding.core.designsystem.theme.extended import com.plcoding.core.presentation.util.DeviceConfiguration import com.plcoding.core.presentation.util.clearFocusOnTap import com.plcoding.core.presentation.util.currentDeviceConfiguration -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpAdaptiveFormLayout( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveResultLayout.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveResultLayout.kt index 9ec5541b..5bd31daf 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveResultLayout.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpAdaptiveResultLayout.kt @@ -25,7 +25,7 @@ import com.plcoding.core.designsystem.components.brand.ChirpBrandLogo import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.presentation.util.DeviceConfiguration import com.plcoding.core.presentation.util.currentDeviceConfiguration -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpAdaptiveResultLayout( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSimpleResultLayout.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSimpleResultLayout.kt index fc8929ad..eb58821a 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSimpleResultLayout.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSimpleResultLayout.kt @@ -19,7 +19,7 @@ import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpSimpleResultLayout( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSurface.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSurface.kt index 3e840da5..732a089b 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSurface.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/layouts/ChirpSurface.kt @@ -19,11 +19,11 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.unit.dp -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.logo_chirp +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.logo_chirp import com.plcoding.core.designsystem.theme.ChirpTheme import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpSurface( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpMultiLineTextField.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpMultiLineTextField.kt index 0ee397cd..972f8aac 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpMultiLineTextField.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpMultiLineTextField.kt @@ -32,7 +32,7 @@ import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpMultiLineTextField( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpPasswordTextField.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpPasswordTextField.kt index e288aee2..4e8c2122 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpPasswordTextField.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpPasswordTextField.kt @@ -23,16 +23,16 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.eye_icon -import chirp.core.designsystem.generated.resources.eye_off_icon -import chirp.core.designsystem.generated.resources.hide_password -import chirp.core.designsystem.generated.resources.show_password +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.eye_icon +import com.plcoding.core.designsystem.eye_off_icon +import com.plcoding.core.designsystem.hide_password +import com.plcoding.core.designsystem.show_password import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpPasswordTextField( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpTextField.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpTextField.kt index 58c2abcd..ca58af5b 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpTextField.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/components/textfields/ChirpTextField.kt @@ -31,7 +31,7 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ChirpTextField( diff --git a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/theme/Type.kt b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/theme/Type.kt index e2b5bd6b..4a54d145 100644 --- a/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/theme/Type.kt +++ b/core/designsystem/src/commonMain/kotlin/com/plcoding/core/designsystem/theme/Type.kt @@ -6,12 +6,12 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp -import chirp.core.designsystem.generated.resources.Res -import chirp.core.designsystem.generated.resources.plusjakartasans_bold -import chirp.core.designsystem.generated.resources.plusjakartasans_light -import chirp.core.designsystem.generated.resources.plusjakartasans_medium -import chirp.core.designsystem.generated.resources.plusjakartasans_regular -import chirp.core.designsystem.generated.resources.plusjakartasans_semibold +import com.plcoding.core.designsystem.Res +import com.plcoding.core.designsystem.plusjakartasans_bold +import com.plcoding.core.designsystem.plusjakartasans_light +import com.plcoding.core.designsystem.plusjakartasans_medium +import com.plcoding.core.designsystem.plusjakartasans_regular +import com.plcoding.core.designsystem.plusjakartasans_semibold import org.jetbrains.compose.resources.Font val PlusJakartaSans @Composable get() = FontFamily( diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts index 7252b2f7..cab77283 100644 --- a/core/domain/build.gradle.kts +++ b/core/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/core/presentation/build.gradle.kts b/core/presentation/build.gradle.kts index 2163f0a8..54567d7b 100644 --- a/core/presentation/build.gradle.kts +++ b/core/presentation/build.gradle.kts @@ -3,6 +3,16 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.core.presentation" + compileSdk = 36 + minSdk = 26 + + androidResources { + enable = true + } + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is @@ -19,8 +29,6 @@ kotlin { implementation(libs.material3.adaptive) implementation(libs.jetbrains.lifecycle.compose) implementation(libs.bundles.koin.common) - - implementation(compose.components.resources) } } @@ -36,4 +44,8 @@ kotlin { } } +} + +compose.resources { + packageOfResClass = "com.plcoding.core.presentation" } \ No newline at end of file diff --git a/core/presentation/src/commonMain/kotlin/com/plcoding/core/presentation/util/DataErrorToUiText.kt b/core/presentation/src/commonMain/kotlin/com/plcoding/core/presentation/util/DataErrorToUiText.kt index ed378022..11436101 100644 --- a/core/presentation/src/commonMain/kotlin/com/plcoding/core/presentation/util/DataErrorToUiText.kt +++ b/core/presentation/src/commonMain/kotlin/com/plcoding/core/presentation/util/DataErrorToUiText.kt @@ -1,22 +1,8 @@ package com.plcoding.core.presentation.util -import chirp.core.presentation.generated.resources.Res -import chirp.core.presentation.generated.resources.error_bad_request -import chirp.core.presentation.generated.resources.error_conflict -import chirp.core.presentation.generated.resources.error_disk_full -import chirp.core.presentation.generated.resources.error_forbidden -import chirp.core.presentation.generated.resources.error_no_internet -import chirp.core.presentation.generated.resources.error_not_found -import chirp.core.presentation.generated.resources.error_payload_too_large -import chirp.core.presentation.generated.resources.error_request_timeout -import chirp.core.presentation.generated.resources.error_serialization -import chirp.core.presentation.generated.resources.error_server -import chirp.core.presentation.generated.resources.error_service_unavailable -import chirp.core.presentation.generated.resources.error_too_many_requests -import chirp.core.presentation.generated.resources.error_unable_to_send_message -import chirp.core.presentation.generated.resources.error_unauthorized -import chirp.core.presentation.generated.resources.error_unknown import com.plcoding.core.domain.util.DataError +import com.plcoding.core.presentation.Res +import com.plcoding.core.presentation.* fun DataError.toUiText(): UiText { val resource = when(this) { diff --git a/feature/auth/domain/build.gradle.kts b/feature/auth/domain/build.gradle.kts index d94bc787..a29793db 100644 --- a/feature/auth/domain/build.gradle.kts +++ b/feature/auth/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.auth.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/auth/presentation/build.gradle.kts b/feature/auth/presentation/build.gradle.kts index 22b7c137..afd6246d 100644 --- a/feature/auth/presentation/build.gradle.kts +++ b/feature/auth/presentation/build.gradle.kts @@ -3,6 +3,16 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.auth.presentation" + compileSdk = 36 + minSdk = 26 + + androidResources { + enable = true + } + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is @@ -19,9 +29,6 @@ kotlin { implementation(projects.core.presentation) implementation(libs.bundles.koin.common) - - implementation(compose.components.resources) - implementation(compose.components.uiToolingPreview) } } @@ -44,4 +51,8 @@ kotlin { } } +} + +compose.resources { + packageOfResClass = "com.plcoding.auth.presentation" } \ No newline at end of file diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/email_verification/EmailVerificationScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/email_verification/EmailVerificationScreen.kt index 94fd7690..c5883536 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/email_verification/EmailVerificationScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/email_verification/EmailVerificationScreen.kt @@ -18,14 +18,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.close -import chirp.feature.auth.presentation.generated.resources.email_verified_failed -import chirp.feature.auth.presentation.generated.resources.email_verified_failed_desc -import chirp.feature.auth.presentation.generated.resources.email_verified_successfully -import chirp.feature.auth.presentation.generated.resources.email_verified_successfully_desc -import chirp.feature.auth.presentation.generated.resources.login -import chirp.feature.auth.presentation.generated.resources.verifying_account +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.close +import com.plcoding.auth.presentation.email_verified_failed +import com.plcoding.auth.presentation.email_verified_failed_desc +import com.plcoding.auth.presentation.email_verified_successfully +import com.plcoding.auth.presentation.email_verified_successfully_desc +import com.plcoding.auth.presentation.login +import com.plcoding.auth.presentation.verifying_account import com.plcoding.core.designsystem.components.brand.ChirpFailureIcon import com.plcoding.core.designsystem.components.brand.ChirpSuccessIcon import com.plcoding.core.designsystem.components.buttons.ChirpButton @@ -36,7 +36,7 @@ import com.plcoding.core.designsystem.components.layouts.ChirpSnackbarScaffold import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/forgot_password/ForgotPasswordScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/forgot_password/ForgotPasswordScreen.kt index 08599d70..a483c571 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/forgot_password/ForgotPasswordScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/forgot_password/ForgotPasswordScreen.kt @@ -13,12 +13,12 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.email -import chirp.feature.auth.presentation.generated.resources.email_placeholder -import chirp.feature.auth.presentation.generated.resources.forgot_password -import chirp.feature.auth.presentation.generated.resources.forgot_password_email_sent_successfully -import chirp.feature.auth.presentation.generated.resources.submit +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.email +import com.plcoding.auth.presentation.email_placeholder +import com.plcoding.auth.presentation.forgot_password +import com.plcoding.auth.presentation.forgot_password_email_sent_successfully +import com.plcoding.auth.presentation.submit import com.plcoding.core.designsystem.components.brand.ChirpBrandLogo import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.layouts.ChirpAdaptiveFormLayout @@ -27,7 +27,7 @@ import com.plcoding.core.designsystem.components.textfields.ChirpTextField import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginScreen.kt index 05c7d54d..f70f418f 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginScreen.kt @@ -15,14 +15,14 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.create_account -import chirp.feature.auth.presentation.generated.resources.email -import chirp.feature.auth.presentation.generated.resources.email_placeholder -import chirp.feature.auth.presentation.generated.resources.forgot_password -import chirp.feature.auth.presentation.generated.resources.login -import chirp.feature.auth.presentation.generated.resources.password -import chirp.feature.auth.presentation.generated.resources.welcome_back +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.create_account +import com.plcoding.auth.presentation.email +import com.plcoding.auth.presentation.email_placeholder +import com.plcoding.auth.presentation.forgot_password +import com.plcoding.auth.presentation.login +import com.plcoding.auth.presentation.password +import com.plcoding.auth.presentation.welcome_back import com.plcoding.core.designsystem.components.brand.ChirpBrandLogo import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle @@ -33,7 +33,7 @@ import com.plcoding.core.designsystem.components.textfields.ChirpTextField import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.presentation.util.ObserveAsEvents import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginViewModel.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginViewModel.kt index 64450e6e..158a7046 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginViewModel.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/login/LoginViewModel.kt @@ -3,9 +3,9 @@ package com.plcoding.auth.presentation.login import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.error_email_not_verified -import chirp.feature.auth.presentation.generated.resources.error_invalid_credentials +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.error_email_not_verified +import com.plcoding.auth.presentation.error_invalid_credentials import com.plcoding.core.domain.auth.AuthService import com.plcoding.core.domain.auth.SessionStorage import com.plcoding.core.domain.util.DataError diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterScreen.kt index be5f37c7..623eab5c 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterScreen.kt @@ -12,17 +12,17 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.viewmodel.compose.viewModel -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.email -import chirp.feature.auth.presentation.generated.resources.email_placeholder -import chirp.feature.auth.presentation.generated.resources.login -import chirp.feature.auth.presentation.generated.resources.password -import chirp.feature.auth.presentation.generated.resources.password_hint -import chirp.feature.auth.presentation.generated.resources.register -import chirp.feature.auth.presentation.generated.resources.username -import chirp.feature.auth.presentation.generated.resources.username_hint -import chirp.feature.auth.presentation.generated.resources.username_placeholder -import chirp.feature.auth.presentation.generated.resources.welcome_to_chirp +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.email +import com.plcoding.auth.presentation.email_placeholder +import com.plcoding.auth.presentation.login +import com.plcoding.auth.presentation.password +import com.plcoding.auth.presentation.password_hint +import com.plcoding.auth.presentation.register +import com.plcoding.auth.presentation.username +import com.plcoding.auth.presentation.username_hint +import com.plcoding.auth.presentation.username_placeholder +import com.plcoding.auth.presentation.welcome_to_chirp import com.plcoding.core.designsystem.components.brand.ChirpBrandLogo import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle @@ -33,7 +33,7 @@ import com.plcoding.core.designsystem.components.textfields.ChirpTextField import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.presentation.util.ObserveAsEvents import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterViewModel.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterViewModel.kt index f49f85b5..def3678b 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterViewModel.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register/RegisterViewModel.kt @@ -3,11 +3,11 @@ package com.plcoding.auth.presentation.register import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.error_account_exists -import chirp.feature.auth.presentation.generated.resources.error_invalid_email -import chirp.feature.auth.presentation.generated.resources.error_invalid_password -import chirp.feature.auth.presentation.generated.resources.error_invalid_username +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.error_account_exists +import com.plcoding.auth.presentation.error_invalid_email +import com.plcoding.auth.presentation.error_invalid_password +import com.plcoding.auth.presentation.error_invalid_username import com.plcoding.core.domain.auth.AuthService import com.plcoding.core.domain.util.DataError import com.plcoding.core.domain.util.onFailure diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register_success/RegisterSuccessScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register_success/RegisterSuccessScreen.kt index 4f2a20bf..55998ba4 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register_success/RegisterSuccessScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/register_success/RegisterSuccessScreen.kt @@ -7,12 +7,12 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.account_successfully_created -import chirp.feature.auth.presentation.generated.resources.login -import chirp.feature.auth.presentation.generated.resources.resend_verification_email -import chirp.feature.auth.presentation.generated.resources.resent_verification_email -import chirp.feature.auth.presentation.generated.resources.verification_email_sent_to_x +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.account_successfully_created +import com.plcoding.auth.presentation.login +import com.plcoding.auth.presentation.resend_verification_email +import com.plcoding.auth.presentation.resent_verification_email +import com.plcoding.auth.presentation.verification_email_sent_to_x import com.plcoding.core.designsystem.components.brand.ChirpSuccessIcon import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle @@ -23,7 +23,7 @@ import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.presentation.util.ObserveAsEvents import org.jetbrains.compose.resources.getString import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordScreen.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordScreen.kt index 56382499..cbcf948f 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordScreen.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordScreen.kt @@ -11,12 +11,12 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.password -import chirp.feature.auth.presentation.generated.resources.password_hint -import chirp.feature.auth.presentation.generated.resources.reset_password_successfully -import chirp.feature.auth.presentation.generated.resources.set_new_password -import chirp.feature.auth.presentation.generated.resources.submit +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.password +import com.plcoding.auth.presentation.password_hint +import com.plcoding.auth.presentation.reset_password_successfully +import com.plcoding.auth.presentation.set_new_password +import com.plcoding.auth.presentation.submit import com.plcoding.core.designsystem.components.brand.ChirpBrandLogo import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.layouts.ChirpAdaptiveFormLayout @@ -26,7 +26,7 @@ import com.plcoding.core.designsystem.components.textfields.ChirpTextField import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordViewModel.kt b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordViewModel.kt index 83ee3ef4..6782e351 100644 --- a/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordViewModel.kt +++ b/feature/auth/presentation/src/commonMain/kotlin/com/plcoding/auth/presentation/reset_password/ResetPasswordViewModel.kt @@ -4,9 +4,9 @@ import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.auth.presentation.generated.resources.Res -import chirp.feature.auth.presentation.generated.resources.error_reset_password_token_invalid -import chirp.feature.auth.presentation.generated.resources.error_same_password +import com.plcoding.auth.presentation.Res +import com.plcoding.auth.presentation.error_reset_password_token_invalid +import com.plcoding.auth.presentation.error_same_password import com.plcoding.core.domain.auth.AuthService import com.plcoding.core.domain.util.DataError import com.plcoding.core.domain.util.onFailure diff --git a/feature/chat/data/build.gradle.kts b/feature/chat/data/build.gradle.kts index 43d4d755..7bd65191 100644 --- a/feature/chat/data/build.gradle.kts +++ b/feature/chat/data/build.gradle.kts @@ -6,6 +6,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.data" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/database/build.gradle.kts b/feature/chat/database/build.gradle.kts index b4cc151f..739c2a5f 100644 --- a/feature/chat/database/build.gradle.kts +++ b/feature/chat/database/build.gradle.kts @@ -4,6 +4,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.database" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/domain/build.gradle.kts b/feature/chat/domain/build.gradle.kts index f5645083..9edf8f15 100644 --- a/feature/chat/domain/build.gradle.kts +++ b/feature/chat/domain/build.gradle.kts @@ -3,6 +3,12 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.domain" + compileSdk = 36 + minSdk = 26 + } + // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the // Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is diff --git a/feature/chat/presentation/build.gradle.kts b/feature/chat/presentation/build.gradle.kts index 341dd377..ddd2d930 100644 --- a/feature/chat/presentation/build.gradle.kts +++ b/feature/chat/presentation/build.gradle.kts @@ -3,6 +3,15 @@ plugins { } kotlin { + androidLibrary { + namespace = "com.plcoding.feature.chat.presentation" + compileSdk = 36 + minSdk = 26 + + androidResources { + enable = true + } + } // Source set declarations. // Declaring a target automatically creates a source set with the same name. By default, the @@ -23,9 +32,6 @@ kotlin { implementation(libs.material3.adaptive.navigation) implementation(libs.jetbrains.compose.backhandler) implementation(libs.kotlinx.datetime) - - implementation(compose.components.resources) - implementation(compose.components.uiToolingPreview) } } @@ -50,4 +56,8 @@ kotlin { } } +} + +compose.resources { + packageOfResClass = "com.plcoding.chat.presentation" } \ No newline at end of file diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailScreen.kt index 0cead8c4..b5f86cb8 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailScreen.kt @@ -42,9 +42,9 @@ import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.no_chat_selected -import chirp.feature.chat.presentation.generated.resources.select_a_chat +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.no_chat_selected +import com.plcoding.chat.presentation.select_a_chat import com.plcoding.chat.domain.models.ChatMessage import com.plcoding.chat.domain.models.ChatMessageDeliveryStatus import com.plcoding.chat.presentation.chat_detail.components.ChatDetailHeader @@ -68,7 +68,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.flow.filter import kotlinx.coroutines.launch import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel import kotlin.time.Clock import kotlin.uuid.ExperimentalUuidApi diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailViewModel.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailViewModel.kt index 8a740ceb..4b31763c 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailViewModel.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/ChatDetailViewModel.kt @@ -6,8 +6,8 @@ import androidx.compose.foundation.text.input.clearText import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.today +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.today import com.plcoding.chat.domain.chat.ChatConnectionClient import com.plcoding.chat.domain.chat.ChatRepository import com.plcoding.chat.domain.message.MessageRepository diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/ChatDetailHeader.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/ChatDetailHeader.kt index f3ad71f4..6ca52962 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/ChatDetailHeader.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/ChatDetailHeader.kt @@ -16,15 +16,15 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.core.designsystem.generated.resources.arrow_left_icon -import chirp.core.designsystem.generated.resources.dots_icon -import chirp.core.designsystem.generated.resources.log_out_icon -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.chat_members -import chirp.feature.chat.presentation.generated.resources.go_back -import chirp.feature.chat.presentation.generated.resources.leave_chat -import chirp.feature.chat.presentation.generated.resources.open_chat_options_menu -import chirp.feature.chat.presentation.generated.resources.users_icon +import com.plcoding.core.designsystem.arrow_left_icon +import com.plcoding.core.designsystem.dots_icon +import com.plcoding.core.designsystem.log_out_icon +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.chat_members +import com.plcoding.chat.presentation.go_back +import com.plcoding.chat.presentation.leave_chat +import com.plcoding.chat.presentation.open_chat_options_menu +import com.plcoding.chat.presentation.users_icon import com.plcoding.chat.domain.models.ChatMessage import com.plcoding.chat.domain.models.ChatMessageDeliveryStatus import com.plcoding.chat.presentation.components.ChatHeader @@ -38,9 +38,9 @@ import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import kotlin.time.Clock -import chirp.core.designsystem.generated.resources.Res as DesignSystemRes +import com.plcoding.core.designsystem.Res as DesignSystemRes @Composable fun ChatDetailHeader( diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/LocalUserMessage.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/LocalUserMessage.kt index 47878686..358d056c 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/LocalUserMessage.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/LocalUserMessage.kt @@ -13,11 +13,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.delete_for_everyone -import chirp.feature.chat.presentation.generated.resources.reload_icon -import chirp.feature.chat.presentation.generated.resources.retry -import chirp.feature.chat.presentation.generated.resources.you +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.delete_for_everyone +import com.plcoding.chat.presentation.reload_icon +import com.plcoding.chat.presentation.retry +import com.plcoding.chat.presentation.you import com.plcoding.chat.domain.models.ChatMessageDeliveryStatus import com.plcoding.chat.presentation.model.MessageUi import com.plcoding.core.designsystem.components.chat.ChirpChatBubble diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageBox.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageBox.kt index 3699eff1..e86ccbc9 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageBox.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageBox.kt @@ -27,10 +27,10 @@ import androidx.compose.ui.input.key.onPreviewKeyEvent import androidx.compose.ui.input.key.type import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cloud_off_icon -import chirp.feature.chat.presentation.generated.resources.send -import chirp.feature.chat.presentation.generated.resources.send_a_message +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cloud_off_icon +import com.plcoding.chat.presentation.send +import com.plcoding.chat.presentation.send_a_message import com.plcoding.chat.domain.models.ConnectionState import com.plcoding.chat.presentation.util.toUiText import com.plcoding.core.designsystem.components.buttons.ChirpButton @@ -39,7 +39,7 @@ import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun MessageBox( diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageList.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageList.kt index 4acdba7a..4ba15dc6 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageList.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageList.kt @@ -19,10 +19,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.no_messages -import chirp.feature.chat.presentation.generated.resources.no_messages_subtitle -import chirp.feature.chat.presentation.generated.resources.retry +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.no_messages +import com.plcoding.chat.presentation.no_messages_subtitle +import com.plcoding.chat.presentation.retry import com.plcoding.chat.presentation.components.EmptySection import com.plcoding.chat.presentation.model.MessageUi import com.plcoding.core.designsystem.components.buttons.ChirpButton diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageListItemUi.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageListItemUi.kt index c70c54dd..f420f1e9 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageListItemUi.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageListItemUi.kt @@ -20,7 +20,7 @@ import com.plcoding.core.designsystem.components.avatar.ChatParticipantUi import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import com.plcoding.core.presentation.util.UiText -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun MessageListItemUi( diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageStatusUi.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageStatusUi.kt index e52504b9..19d377d4 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageStatusUi.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_detail/components/MessageStatusUi.kt @@ -13,12 +13,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.check_icon -import chirp.feature.chat.presentation.generated.resources.failed -import chirp.feature.chat.presentation.generated.resources.loading_icon -import chirp.feature.chat.presentation.generated.resources.sending -import chirp.feature.chat.presentation.generated.resources.sent +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.check_icon +import com.plcoding.chat.presentation.failed +import com.plcoding.chat.presentation.loading_icon +import com.plcoding.chat.presentation.sending +import com.plcoding.chat.presentation.sent import com.plcoding.chat.domain.models.ChatMessageDeliveryStatus import com.plcoding.core.designsystem.theme.extended import com.plcoding.core.designsystem.theme.labelXSmall diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/ChatListScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/ChatListScreen.kt index 7d98e502..64e8b279 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/ChatListScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/ChatListScreen.kt @@ -27,14 +27,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cancel -import chirp.feature.chat.presentation.generated.resources.create_chat -import chirp.feature.chat.presentation.generated.resources.do_you_want_to_logout -import chirp.feature.chat.presentation.generated.resources.do_you_want_to_logout_desc -import chirp.feature.chat.presentation.generated.resources.logout -import chirp.feature.chat.presentation.generated.resources.no_chats -import chirp.feature.chat.presentation.generated.resources.no_chats_subtitle +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cancel +import com.plcoding.chat.presentation.create_chat +import com.plcoding.chat.presentation.do_you_want_to_logout +import com.plcoding.chat.presentation.do_you_want_to_logout_desc +import com.plcoding.chat.presentation.logout +import com.plcoding.chat.presentation.no_chats +import com.plcoding.chat.presentation.no_chats_subtitle import com.plcoding.chat.presentation.chat_list.components.ChatListHeader import com.plcoding.chat.presentation.chat_list.components.ChatListItemUi import com.plcoding.chat.presentation.components.EmptySection @@ -48,7 +48,7 @@ import com.plcoding.core.presentation.permissions.rememberPermissionController import com.plcoding.core.presentation.util.ObserveAsEvents import kotlinx.coroutines.launch import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListHeader.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListHeader.kt index 27b3d827..eae31536 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListHeader.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListHeader.kt @@ -13,12 +13,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.core.designsystem.generated.resources.log_out_icon -import chirp.core.designsystem.generated.resources.logo_chirp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.logout -import chirp.feature.chat.presentation.generated.resources.profile_settings -import chirp.feature.chat.presentation.generated.resources.users_icon +import com.plcoding.core.designsystem.log_out_icon +import com.plcoding.core.designsystem.logo_chirp +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.logout +import com.plcoding.chat.presentation.profile_settings +import com.plcoding.chat.presentation.users_icon import com.plcoding.chat.presentation.components.ChatHeader import com.plcoding.core.designsystem.components.avatar.ChatParticipantUi import com.plcoding.core.designsystem.components.avatar.ChirpAvatarPhoto @@ -28,8 +28,8 @@ import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview -import chirp.core.designsystem.generated.resources.Res as DesignSystemRes +import androidx.compose.ui.tooling.preview.Preview +import com.plcoding.core.designsystem.Res as DesignSystemRes @Composable fun ChatListHeader( diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListItemUi.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListItemUi.kt index 12dfc0bc..690a6c67 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListItemUi.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/chat_list/components/ChatListItemUi.kt @@ -24,9 +24,9 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.withStyle import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.group_chat -import chirp.feature.chat.presentation.generated.resources.you +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.group_chat +import com.plcoding.chat.presentation.you import com.plcoding.chat.domain.models.ChatMessage import com.plcoding.chat.domain.models.ChatMessageDeliveryStatus import com.plcoding.chat.presentation.components.ChatItemHeaderRow @@ -37,7 +37,7 @@ import com.plcoding.core.designsystem.theme.ChirpTheme import com.plcoding.core.designsystem.theme.extended import com.plcoding.core.designsystem.theme.titleXSmall import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import kotlin.time.Clock @Composable diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatItemHeaderRow.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatItemHeaderRow.kt index 0c70c85e..1058631d 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatItemHeaderRow.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatItemHeaderRow.kt @@ -12,10 +12,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.group_chat -import chirp.feature.chat.presentation.generated.resources.only_you -import chirp.feature.chat.presentation.generated.resources.you +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.group_chat +import com.plcoding.chat.presentation.only_you +import com.plcoding.chat.presentation.you import com.plcoding.chat.presentation.model.ChatUi import com.plcoding.core.designsystem.components.avatar.ChirpStackedAvatars import com.plcoding.core.designsystem.theme.extended diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatParticipantSearchTextSection.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatParticipantSearchTextSection.kt index 4213daf3..7067e9d5 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatParticipantSearchTextSection.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ChatParticipantSearchTextSection.kt @@ -9,9 +9,9 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.add -import chirp.feature.chat.presentation.generated.resources.email_or_username +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.add +import com.plcoding.chat.presentation.email_or_username import com.plcoding.core.designsystem.components.buttons.ChirpButton import com.plcoding.core.designsystem.components.buttons.ChirpButtonStyle import com.plcoding.core.designsystem.components.textfields.ChirpTextField diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/EmptySection.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/EmptySection.kt index d8b202f6..f2d7331f 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/EmptySection.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/EmptySection.kt @@ -12,8 +12,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.empty_chat +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.empty_chat import com.plcoding.core.designsystem.theme.extended import com.plcoding.core.presentation.util.DeviceConfiguration import com.plcoding.core.presentation.util.currentDeviceConfiguration diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ManageChatHeaderRow.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ManageChatHeaderRow.kt index f0799ad2..89e3c2c1 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ManageChatHeaderRow.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/ManageChatHeaderRow.kt @@ -12,8 +12,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cancel +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cancel import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/manage_chat/ManageChatScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/manage_chat/ManageChatScreen.kt index f08a270a..f563ee49 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/manage_chat/ManageChatScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/components/manage_chat/ManageChatScreen.kt @@ -17,8 +17,8 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cancel +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cancel import com.plcoding.chat.presentation.components.ChatParticipantSearchTextSection import com.plcoding.chat.presentation.components.ChatParticipantsSelectionSection import com.plcoding.chat.presentation.components.ManageChatButtonSection @@ -31,7 +31,7 @@ import com.plcoding.core.presentation.util.DeviceConfiguration import com.plcoding.core.presentation.util.clearFocusOnTap import com.plcoding.core.presentation.util.currentDeviceConfiguration import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ManageChatScreen( diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatScreen.kt index 05692be1..d6f6f1c8 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatScreen.kt @@ -3,8 +3,8 @@ package com.plcoding.chat.presentation.create_chat import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.create_chat +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.create_chat import com.plcoding.chat.domain.models.Chat import com.plcoding.chat.presentation.components.manage_chat.ManageChatAction import com.plcoding.chat.presentation.components.manage_chat.ManageChatScreen diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatViewModel.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatViewModel.kt index b0027f43..d6a60d02 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatViewModel.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/create_chat/CreateChatViewModel.kt @@ -4,8 +4,8 @@ import androidx.compose.foundation.text.input.clearText import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.error_participant_not_found +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.error_participant_not_found import com.plcoding.chat.domain.participant.ChatParticipantService import com.plcoding.chat.domain.chat.ChatRepository import com.plcoding.chat.presentation.components.manage_chat.ManageChatAction diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatScreen.kt index 433576ec..615ec3d6 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatScreen.kt @@ -5,10 +5,10 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.chat_members -import chirp.feature.chat.presentation.generated.resources.create_chat -import chirp.feature.chat.presentation.generated.resources.save +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.chat_members +import com.plcoding.chat.presentation.create_chat +import com.plcoding.chat.presentation.save import com.plcoding.chat.presentation.components.manage_chat.ManageChatAction import com.plcoding.chat.presentation.components.manage_chat.ManageChatScreen import com.plcoding.core.designsystem.components.dialogs.ChirpAdaptiveDialogSheetLayout diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatViewModel.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatViewModel.kt index c398d240..4fc370b1 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatViewModel.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/manage_chat/ManageChatViewModel.kt @@ -6,8 +6,8 @@ import androidx.compose.foundation.text.input.clearText import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.error_participant_not_found +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.error_participant_not_found import com.plcoding.chat.domain.participant.ChatParticipantService import com.plcoding.chat.domain.chat.ChatRepository import com.plcoding.chat.presentation.components.manage_chat.ManageChatAction diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileScreen.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileScreen.kt index 21e2a2f7..af6c18b8 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileScreen.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileScreen.kt @@ -31,22 +31,22 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cancel -import chirp.feature.chat.presentation.generated.resources.contact_chirp_support_change_email -import chirp.feature.chat.presentation.generated.resources.current_password -import chirp.feature.chat.presentation.generated.resources.delete -import chirp.feature.chat.presentation.generated.resources.delete_profile_picture -import chirp.feature.chat.presentation.generated.resources.delete_profile_picture_desc -import chirp.feature.chat.presentation.generated.resources.email -import chirp.feature.chat.presentation.generated.resources.new_password -import chirp.feature.chat.presentation.generated.resources.password -import chirp.feature.chat.presentation.generated.resources.password_change_successful -import chirp.feature.chat.presentation.generated.resources.password_hint -import chirp.feature.chat.presentation.generated.resources.profile_image -import chirp.feature.chat.presentation.generated.resources.save -import chirp.feature.chat.presentation.generated.resources.upload_icon -import chirp.feature.chat.presentation.generated.resources.upload_image +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cancel +import com.plcoding.chat.presentation.contact_chirp_support_change_email +import com.plcoding.chat.presentation.current_password +import com.plcoding.chat.presentation.delete +import com.plcoding.chat.presentation.delete_profile_picture +import com.plcoding.chat.presentation.delete_profile_picture_desc +import com.plcoding.chat.presentation.email +import com.plcoding.chat.presentation.new_password +import com.plcoding.chat.presentation.password +import com.plcoding.chat.presentation.password_change_successful +import com.plcoding.chat.presentation.password_hint +import com.plcoding.chat.presentation.profile_image +import com.plcoding.chat.presentation.save +import com.plcoding.chat.presentation.upload_icon +import com.plcoding.chat.presentation.upload_image import com.plcoding.chat.presentation.profile.components.DragAndDropOverlay import com.plcoding.chat.presentation.profile.components.ProfileHeaderSection import com.plcoding.chat.presentation.profile.components.ProfileSectionLayout @@ -68,7 +68,7 @@ import com.plcoding.core.presentation.util.clearFocusOnTap import com.plcoding.core.presentation.util.currentDeviceConfiguration import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Composable diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileViewModel.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileViewModel.kt index f7f1b34b..26a7ffd1 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileViewModel.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/ProfileViewModel.kt @@ -5,10 +5,10 @@ import androidx.compose.foundation.text.input.clearText import androidx.compose.runtime.snapshotFlow import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.error_current_password_equal_to_new_one -import chirp.feature.chat.presentation.generated.resources.error_current_password_incorrect -import chirp.feature.chat.presentation.generated.resources.error_invalid_file_type +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.error_current_password_equal_to_new_one +import com.plcoding.chat.presentation.error_current_password_incorrect +import com.plcoding.chat.presentation.error_invalid_file_type import com.plcoding.chat.domain.participant.ChatParticipantRepository import com.plcoding.chat.domain.participant.ChatParticipantService import com.plcoding.core.domain.auth.AuthService diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/DragAndDropOverlay.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/DragAndDropOverlay.kt index e3b964a6..2a9e13fd 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/DragAndDropOverlay.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/DragAndDropOverlay.kt @@ -13,10 +13,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.drop_picture_info -import chirp.feature.chat.presentation.generated.resources.upload_icon -import chirp.feature.chat.presentation.generated.resources.upload_image +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.drop_picture_info +import com.plcoding.chat.presentation.upload_icon +import com.plcoding.chat.presentation.upload_image import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/ProfileHeaderSection.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/ProfileHeaderSection.kt index 8a291d8f..e4e7c57b 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/ProfileHeaderSection.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/profile/components/ProfileHeaderSection.kt @@ -12,9 +12,9 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.cancel -import chirp.feature.chat.presentation.generated.resources.profile_settings +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.cancel +import com.plcoding.chat.presentation.profile_settings import com.plcoding.core.designsystem.components.buttons.ChirpIconButton import com.plcoding.core.designsystem.theme.extended import org.jetbrains.compose.resources.stringResource diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/ConnectionStateToUiText.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/ConnectionStateToUiText.kt index 3b9a4be2..29360794 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/ConnectionStateToUiText.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/ConnectionStateToUiText.kt @@ -1,11 +1,11 @@ package com.plcoding.chat.presentation.util -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.network_error -import chirp.feature.chat.presentation.generated.resources.offline -import chirp.feature.chat.presentation.generated.resources.online -import chirp.feature.chat.presentation.generated.resources.reconnecting -import chirp.feature.chat.presentation.generated.resources.unknown_error +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.network_error +import com.plcoding.chat.presentation.offline +import com.plcoding.chat.presentation.online +import com.plcoding.chat.presentation.reconnecting +import com.plcoding.chat.presentation.unknown_error import com.plcoding.chat.domain.models.ConnectionState import com.plcoding.core.presentation.util.UiText diff --git a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/DateUtils.kt b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/DateUtils.kt index 99c86114..b8c77b09 100644 --- a/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/DateUtils.kt +++ b/feature/chat/presentation/src/commonMain/kotlin/com/plcoding/chat/presentation/util/DateUtils.kt @@ -1,10 +1,10 @@ package com.plcoding.chat.presentation.util -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.today -import chirp.feature.chat.presentation.generated.resources.today_x -import chirp.feature.chat.presentation.generated.resources.yesterday -import chirp.feature.chat.presentation.generated.resources.yesterday_x +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.today +import com.plcoding.chat.presentation.today_x +import com.plcoding.chat.presentation.yesterday +import com.plcoding.chat.presentation.yesterday_x import com.plcoding.core.presentation.util.UiText import kotlinx.datetime.DateTimeUnit import kotlinx.datetime.LocalDate diff --git a/feature/chat/presentation/src/desktopMain/kotlin/com/plcoding/chat/presentation/profile/mediapicker/rememberImagePickerLauncher.desktop.kt b/feature/chat/presentation/src/desktopMain/kotlin/com/plcoding/chat/presentation/profile/mediapicker/rememberImagePickerLauncher.desktop.kt index 4a53b3ed..e410893b 100644 --- a/feature/chat/presentation/src/desktopMain/kotlin/com/plcoding/chat/presentation/profile/mediapicker/rememberImagePickerLauncher.desktop.kt +++ b/feature/chat/presentation/src/desktopMain/kotlin/com/plcoding/chat/presentation/profile/mediapicker/rememberImagePickerLauncher.desktop.kt @@ -3,8 +3,8 @@ package com.plcoding.chat.presentation.profile.mediapicker import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import chirp.feature.chat.presentation.generated.resources.Res -import chirp.feature.chat.presentation.generated.resources.select_a_profile_picture +import com.plcoding.chat.presentation.Res +import com.plcoding.chat.presentation.select_a_profile_picture import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ensureActive import kotlinx.coroutines.launch diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f34809d2..47cf1637 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # Build tools -agp = "9.0.0" +agp = "9.0.0-rc02" composeBom = "2025.07.00" kotlin = "2.3.0" ksp = "2.3.4" @@ -11,11 +11,10 @@ androidDesugarJdkLibs = "2.1.5" androidTools = "32.0.0-rc02" # Compose -compose-hot-reload = "1.0.0-beta04" -compose-multiplatform = "1.9.3" +compose-multiplatform = "1.10.0" # Maintain compose multiplatform version aligned with navigation, cache error could happen -compose-lifecycle = "2.9.1" -navigation-compose = "2.9.0-beta04" +compose-lifecycle = "2.10.0-alpha06" +navigation-compose = "2.9.1" jetbrains-core-bundle = "1.0.1" material-icons = "1.7.3" @@ -41,7 +40,7 @@ room = "2.7.2" sqlite = "2.5.2" datastore = "1.1.7" firebase-bom = "34.0.0" -adaptive = "1.2.0-alpha04" +adaptive = "1.3.0-alpha02" compose-jetbrains = "1.8.2" jetbrains-savedstate = "1.3.1" coil = "3.3.0" @@ -149,6 +148,7 @@ android-desugarJdkLibs = { module = "com.android.tools:desugar_jdk_libs", versio android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "agp" } android-tools-common = { group = "com.android.tools", name = "common", version.ref = "androidTools" } compose-gradlePlugin = { group = "org.jetbrains.kotlin", name = "compose-compiler-gradle-plugin", version.ref = "kotlin" } +jetbrains-compose-gradlePlugin = { group = "org.jetbrains.compose", name = "compose-gradle-plugin", version.ref = "compose-multiplatform" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } androidx-room-gradle-plugin = { module = "androidx.room:room-gradle-plugin", version.ref = "room" } ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" } @@ -166,6 +166,9 @@ jetbrains-compose-material-icons-core = { module = "org.jetbrains.compose.materi jetbrains-compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "material-icons"} jetbrains-compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref="compose-jetbrains"} jetbrains-compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref="compose-jetbrains"} +jetbrains-compose-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "compose-multiplatform" } +jetbrains-compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "compose-multiplatform" } +jetbrains-compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "compose-multiplatform" } jetbrains-lifecycle-viewmodel = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel", version.ref = "compose-lifecycle" } jetbrains-lifecycle-compose = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "compose-lifecycle" } @@ -197,7 +200,6 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } # Compose -compose-hot-reload = { id = "org.jetbrains.compose.hot-reload", version.ref = "compose-hot-reload" } compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 5e4d490c..a7238bad 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -169,7 +169,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 = "export JAVA_HOME=/Applications/Android\\ Studio.app/Contents/jbr/Contents/Home/\nexport JDK_HOME=/Applications/Android\\ Studio.app/Contents/jbr/Contents/\n\nif [ \"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"; }; /* End PBXShellScriptBuildPhase section */