This message was deleted.
# multiplatform
s
This message was deleted.
m
This is not the correct way to use Kotlin/Native, you need first to set add a native target, try to add iosArm64() for example. Now you only have a jvm target that's why you can use java libraries in common main.
a
Thanks for the reply! I did add the following but I’m getting a build failure
m
I'm not sure what's causing this but try to add this to your gradle
a
Still getting the same build failure, I’m not sure either, I didn’t add any plugins other than multiplatform
m
I think it's because of this, it shouldn't be here.
Copy code
repositories {
    mavenCentral()
}
a
In the build.gradle.kts of the project module maybe?
m
no in the settings.gradle.kts
settings.gradle.kts
a
It’s already in there
m
add dependencyResolutionManagement... to settings.gralde.kts and remove repositories { mavenCentral() } from build.gralde.kts
a
Already tried and it gives me warrning
Now it’s working
Can’t beleive it’s because of this
I didn’t remove mavenCentral from build.gradle.kts in the module where I have this bug
m
add google and gradlePluginPortal as well you may need them in the future for some other dependencies.
👍 1
It's not needed anymore there, the configuration in settings.gradle.kts are going to be applied all over the project.
a
You sounds like real expert in multiplatform
m
Maybe haha
a
And gradle
Gradle is the only thing I don’t like about Kotlin
m
I have a video that contains some necessary informations about gradle in Kotlin Multiplatform you can check it and you will understand it more.

https://youtu.be/HpfFu2nl32s?si=PC136Y7PB7BZZRr1

a
Thanks