Fix iOS build

This commit is contained in:
Syer10
2024-09-02 10:39:43 -04:00
parent 0384c77d1e
commit 81d2e8119b
9 changed files with 53 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ json = "1.7.1"
composeGradle = "1.6.11" composeGradle = "1.6.11"
# Compose Libraries # Compose Libraries
parcelize = "0.9.0"
voyager = "1.0.0" voyager = "1.0.0"
accompanist = "0.30.1" accompanist = "0.30.1"
googleAccompanist = "0.30.1" googleAccompanist = "0.30.1"
@@ -163,6 +164,7 @@ korge-foundation = { module = "com.soywiz.korge:korge-foundation", version.ref =
# Localization # Localization
moko-core = { module = "dev.icerock.moko:resources", version.ref = "moko" } moko-core = { module = "dev.icerock.moko:resources", version.ref = "moko" }
moko-compose = { module = "dev.icerock.moko:resources-compose", version.ref = "moko" } moko-compose = { module = "dev.icerock.moko:resources-compose", version.ref = "moko" }
moko-parcelize = { module = "dev.icerock.moko:parcelize", version.ref = "parcelize" }
# Optimizer # Optimizer
proguard = { module = "com.guardsquare:proguard-gradle", version.ref = "proguard" } proguard = { module = "com.guardsquare:proguard-gradle", version.ref = "proguard" }

View File

@@ -53,6 +53,12 @@ kotlin {
implementation(kotlin("test-annotations-common")) implementation(kotlin("test-annotations-common"))
} }
} }
getByName("iosMain") {
dependencies {
implementation(libs.moko.parcelize)
}
}
} }
} }

View File

@@ -134,3 +134,5 @@ dependencies {
buildkonfig { buildkonfig {
packageName = "ca.gosyer.jui.ios.build" packageName = "ca.gosyer.jui.ios.build"
} }
tasks.register("kspCommonMainKotlinMetadata")

View File

@@ -0,0 +1,13 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.jui.ios
import ca.gosyer.jui.uicore.vm.ContextWrapper
actual fun create(context: ContextWrapper): AppComponent {
return AppComponent.create(context)
}

View File

@@ -42,3 +42,5 @@ abstract class AppComponent(
.also { appComponentInstance = it } .also { appComponentInstance = it }
} }
} }
expect fun create(context: ContextWrapper): AppComponent

View File

@@ -0,0 +1,13 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.jui.ios
import ca.gosyer.jui.uicore.vm.ContextWrapper
actual fun create(context: ContextWrapper): AppComponent {
return AppComponent.create(context)
}

View File

@@ -0,0 +1,13 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package ca.gosyer.jui.ios
import ca.gosyer.jui.uicore.vm.ContextWrapper
actual fun create(context: ContextWrapper): AppComponent {
return AppComponent.create(context)
}

View File

@@ -19,7 +19,7 @@ actual fun getLicenses(): Libs? {
null, null,
) { ) {
withIOContext { withIOContext {
val json = MR.files.aboutlibraries.readText() val json = MR.files.aboutlibraries_json.readText()
value = Libs.Builder().withJson(json).build() value = Libs.Builder().withJson(json).build()
} }
} }

View File

@@ -10,7 +10,7 @@ import androidx.compose.ui.text.intl.Locale
import platform.Foundation.NSString import platform.Foundation.NSString
import platform.Foundation.localizedCaseInsensitiveCompare import platform.Foundation.localizedCaseInsensitiveCompare
actual class CollatorComparator : Comparator<String> { actual class CollatorComparator() : Comparator<String> {
actual constructor(locale: Locale) : this() actual constructor(locale: Locale) : this()
actual override fun compare( actual override fun compare(