Skip to content

Commit

Permalink
🪥 Update Moko resources
Browse files Browse the repository at this point in the history
Moko resources updated to the latest beta to support Kotlin 2.0.
  • Loading branch information
igorescodro committed May 20, 2024
1 parent 201abce commit 541c1b0
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 42 deletions.
1 change: 1 addition & 0 deletions features/category/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kotlin {
implementation(libs.kotlinx.collections.immutable)
implementation(libs.moko.resources.compose)
implementation(libs.moko.mvvm.compose)
implementation(libs.moko.parcelize)
}

commonTestDependencies {
Expand Down
9 changes: 0 additions & 9 deletions features/home/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ kotlin {
implementation(libs.moko.mvvm.compose)
}

// Explicit dependency due to Moko issues with Kotlin 1.9.0
// https://github.com/icerockdev/moko-resources/issues/531
sourceSets {
val commonMain by getting
val androidMain by getting {
dependsOn(commonMain)
}
}

androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fun OpenSource(onUpPress: () -> Unit, modifier: Modifier = Modifier) {

@Composable
private fun OpenSourceContent(modifier: Modifier = Modifier) {
val licenses by MR.files.aboutlibraries.readTextAsState()
val licenses by MR.files.aboutlibraries_json.readTextAsState()

LibrariesContainer(
aboutLibsJson = licenses ?: "",
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sqldelight = "2.0.0"
# Moko
moko = "0.16.1"
moko_parcelize = "0.9.0"
moko_resources = "0.23.0"
moko_resources = "0.24.0-beta-4"
moko_permissions = "0.18.0"

# AtomicFU
Expand Down
22 changes: 1 addition & 21 deletions resources/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,13 @@ kotlin {
implementation(libs.moko.resources.core)
implementation(libs.koin.core)
}

// Explicit dependency due to Moko issues with Kotlin 1.9.0
// https://github.com/icerockdev/moko-resources/issues/531
sourceSets {
val commonMain by getting
val androidMain by getting {
dependsOn(commonMain)
}
}
}

android {
namespace = "com.escodro.resources"
}

multiplatformResources {
multiplatformResourcesPackage = "com.escodro.resources"
resourcesPackage.set("com.escodro.resources")
iosBaseLocalizationRegion = "en-US"
}

// Define explicit dependency for Moko resources
// https://github.com/icerockdev/moko-resources/issues/421
afterEvaluate {
tasks.named("iosSimulatorArm64ProcessResources") {
dependsOn("generateMRcommonMain")
}
tasks.named("iosX64ProcessResources") {
dependsOn("generateMRcommonMain")
}
}
11 changes: 1 addition & 10 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,6 @@ kotlin {
implementation(libs.koin.test)
implementation(libs.kotlinx.datetime)
}

// Explicit dependency due to Moko issues with Kotlin 1.9.0
// https://github.com/icerockdev/moko-resources/issues/531
sourceSets {
val commonMain by getting
val androidMain by getting {
dependsOn(commonMain)
}
}
}

android {
Expand All @@ -104,7 +95,7 @@ android {
}

multiplatformResources {
multiplatformResourcesPackage = "com.escodro.alkaa"
resourcesPackage.set("com.escodro.alkaa")
}

// Add compile options to link sqlite3 library allowing iOS UI testing
Expand Down

0 comments on commit 541c1b0

Please sign in to comment.