katokay
06/06/2020, 3:23 PMkotlin.mpp.enableGranularSourceSetsMetadata=true
to gradle.properties file
5. Changed shared build.gradle.kts to have
kotlin {
android()
ios()
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val androidMain by getting {
dependencies {
implementation(kotlin("stdlib-jdk7"))
implementation("androidx.core:core-ktx:1.2.0")
}
}
val androidTest by getting {}
}
}
This is where I get the error in both IntelliJ and gradle cli. I've also verified the gradle plugin defined for the root build.gradle.kts is classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M2")
and my gradle version is 6.5. I realize I might be misunderstanding something from the blog post, but hopefully someone can help clarify how this should work or look. Maybe pointing to a sample repo if one is available and known to work would help. The really odd behavior is that I can navigate from the IDE to the implementation of the ios target definition.zalewski.se
06/06/2020, 3:45 PMval iosMain by getting {
dependencies {}
}
katokay
06/06/2020, 3:50 PMLiliia
06/08/2020, 1:15 PMMultiplatform Mobile Application
template in the wizard? If so, am I right that there is still packForXcode
task in the same build.gradle.kts
file where the part mentioned in the original post resides? If so, that’s probably the root cause: when you replace iosX64("ios")
call with ios()
without updating calls in the mentioned task, it continues looking for a target customly named ios
by the user while there is no such task: ios()
is actually shorthand for a bit more complicated hierarchical structure and not a target itself.katokay
06/08/2020, 7:22 PMkatokay
06/10/2020, 7:58 PM