Comments (6)
`import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsCompose)
kotlin("plugin.serialization") version "1.9.21"
id("app.cash.sqldelight") version "2.0.1"
id ("dev.icerock.mobile.multiplatform-resources") version "0.23.0"
}
kotlin {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
jvm("desktop")
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
sourceSets {
val androidMain by getting {
dependsOn(commonMain.get())
dependencies {
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
// ktor client
implementation("io.ktor:ktor-client-android:2.3.7")
implementation("io.ktor:ktor-client-okhttp:2.3.7")
// koin di
implementation("io.insert-koin:koin-core:3.5.0")
implementation("io.insert-koin:koin-android:3.4.3")
// sqldelight
implementation("app.cash.sqldelight:android-driver:2.0.1")
//Connectivity Status
implementation("dev.tmapps:konnection:1.1.11")
}
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
@OptIn(ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
// kamel image loading
implementation("media.kamel:kamel-image:0.9.1")
// ktor client
implementation("io.ktor:ktor-client-core:2.3.7")
implementation("io.ktor:ktor-client-auth:2.3.7")
implementation("io.ktor:ktor-client-content-negotiation:2.3.7")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.7")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
// precompose
api("moe.tlaster:precompose:1.5.10")
api("moe.tlaster:precompose-viewmodel:1.5.10")
api("moe.tlaster:precompose-koin:1.5.10")
// koin
implementation("io.insert-koin:koin-core:3.5.0")
implementation("io.insert-koin:koin-compose:1.1.0")
// sqldelight ext
implementation("app.cash.sqldelight:coroutines-extensions:2.0.1")
//Shared Settings
implementation("com.russhwolf:multiplatform-settings-no-arg:1.1.1")
//WebView
implementation("io.github.kevinnzou:compose-webview-multiplatform:1.8.6")
//Base64
implementation("com.squareup.okio:okio:3.7.0")
//Icons
implementation("br.com.devsrsouza.compose.icons:font-awesome:1.1.0")
// Voyager Navigator
implementation("cafe.adriel.voyager:voyager-navigator:1.0.0")
//KotlinX Date
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0")
//Cupertino Widgets
implementation("io.github.alexzhirkevich:cupertino-adaptive:0.1.0-alpha03")
//moko resources
implementation("dev.icerock.moko:resources-compose:0.23.0")
}
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain.get())
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
dependencies {
// darwin ktor client for ios
implementation("io.ktor:ktor-client-darwin:2.3.7")
// sql delight ios driver
implementation("app.cash.sqldelight:native-driver:2.0.1")
//Connectivity Status
implementation("dev.tmapps:konnection:1.1.11")
}
}
val desktopMain by getting{
dependsOn(commonMain.get())
dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.desktop.common)
// darwin ktor client for jvm
implementation("io.ktor:ktor-client-apache:2.3.7")
// sql delight desktop driver
implementation("app.cash.sqldelight:sqlite-driver:2.0.0")
}
}
}
sqldelight{
databases{
create("AppDatabase"){
packageName.set("app_db")
srcDirs("src/commonMain/sqldelight")
}
}
}
multiplatformResources{
multiplatformResourcesPackage = "com.incture.cmp" // required
}
}
android {
namespace = "com.incture.cmp"
compileSdk = 34
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["main"].res.srcDirs("src/androidMain/res","src/commonMain/resources")
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
defaultConfig {
applicationId = "com.incture.cmp"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
vectorDrawables {
useSupportLibrary = true
}
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
debugImplementation(libs.compose.ui.tooling)
implementation("androidx.compose.runtime:runtime:1.4.3")
implementation("androidx.compose.runtime:runtime-livedata:1.4.3")
implementation("androidx.navigation:navigation-compose:2.5.2")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.core:core-splashscreen:1.0.0")
// SAP Cloud Android SDK dependencies
implementation("com.sap.cloud.android:foundation:7.1.0")
implementation("com.sap.cloud.android:foundation-app-security:7.1.0")
implementation("com.sap.cloud.android:onboarding-compose:7.1.0")
implementation("com.sap.cloud.android:flows-compose:7.1.0")
implementation("com.sap.cloud.android:fiori-composable-theme:7.1.0")
implementation("com.sap.cloud.android:fiori-compose-ui:7.1.0")
implementation("com.sap.cloud.android:permission-request-tracker:7.1.0")
// Android Architecture Components
implementation("androidx.lifecycle:lifecycle-viewmodel:2.5.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation("androidx.paging:paging-common-ktx:3.0.0")
implementation("androidx.paging:paging-compose:1.0.0-alpha16")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
implementation("androidx.work:work-runtime-ktx:2.6.0")
implementation("com.google.guava:guava:27.0.1-android")
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.material3:material3")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "com.incture.cmp"
packageVersion = "1.0.0"
}
jvmArgs("--add-opens", "java.desktop/sun.awt=ALL-UNNAMED")
jvmArgs("--add-opens", "java.desktop/java.awt.peer=ALL-UNNAMED") // recommended but not necessary
if (System.getProperty("os.name").contains("Mac")) {
jvmArgs("--add-opens", "java.desktop/sun.lwawt=ALL-UNNAMED")
jvmArgs("--add-opens", "java.desktop/sun.lwawt.macosx=ALL-UNNAMED")
}
}
}
`
from moko-resources.
<key>CFBundleLocalizations</key> <array> <string>en</string> <string>fr</string> </array>
from moko-resources.
And Iam trying to fetch from common module
stringResource(MR.strings.my_string)
from moko-resources.
Any news on this @JagadishaIncture
I have this error too on my physical Iphone i got the string key and it is the same on the emulator but for only one it display the value( emulator Iphone 15 Plus 17.0.1 )
What i have try (but fail to resolve the issue) :
- Clean Up my project
- Update moko
from moko-resources.
Update for my case :
- My string work on EN but not on FR (French)
from moko-resources.
I solved my problem on the French language.
The error was due to the fact that I put a \ on that "
example:
- before
<string name="validate_date_end_error_equal_to_date_start">Le champ \"Date de Fin\" .</string>
- after
<string name="validate_date_end_error_equal_to_date_start">Le champ "Date de Fin" .</string>
If it's can help you 😸 @JagadishaIncture
from moko-resources.
Related Issues (20)
- 0.24.0-beta-2 includes file extension in `files` and `assets` in the resource name HOT 1
- Apostrophe incorrectly displayed on iOS HOT 3
- 0.24.0-beta-03 includes removed strings and fails to build HOT 3
- 0.24.0-beta-3 incorrectly escapes unicode character sequences in iOS strings file HOT 2
- Add observable to StringDesc.localeType
- 0.24.0-beta-03 When compiled on windows, android assets use \ instead of / for folder paths HOT 1
- Cannot change attributes of dependency configuration ':xxx:iosX64CInteropApiElements' after it has been resolved HOT 11
- Resolving dependency configuration 'metadataCompilationApi' is not allowed as it is defined as 'canBeResolved=false' HOT 1
- Load image as plain resource by string on iOS
- Slow loading of string resource at first open of screen HOT 6
- Suggested improvements to CopyFrameworkResourcesToAppTask HOT 1
- 0.24.0-beta-4 incorrectly handles plurals with `"` character; displays as `\"` on iOS and doesn't display on Android. HOT 2
- Font caching Issue for ios HOT 9
- Crash when using MR.strings() in unit tests iOS HOT 9
- Are there plans to support linuxX64? HOT 1
- Remove unnecessary dependency HOT 1
- How do I get the text value on JVM? HOT 2
- Have a dumb question about a different approach to save resources directly in a Kotlin file :D HOT 1
- 0.24.0-beta-5 creates invalid unicode escape sequence HOT 8
- Can't use Moko resources for JVM target HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moko-resources.