Sujit
10/21/2019, 7:43 PMval ios64 = iosArm64("ios64")
val iosSim = iosX64("iosSim")
val iosMain by sourceSets.creating {
dependencies {
implementation(kotlin(Config.ios.dependencies.stdlib))
implementation(Config.ios.dependencies.serialization)
implementation(Config.ios.dependencies.coroutines)
}
}
val iosTest by sourceSets.creating {
dependencies {
implementation(kotlin(Config.ios.dependencies.stdlib))
implementation(Config.android.dependencies.coroutinesTest)
}
}
configure(listOf(ios64, iosSim)) {
binaries.framework {
baseName = Config.ios.frameworkName
freeCompilerArgs.add("-Xobjc-generics")
}
sourceSets {
@Suppress("UNUSED_VARIABLE")
val ios64Main by getting {
dependsOn(iosMain)
}
@Suppress("UNUSED_VARIABLE")
val iosSimMain by getting {
dependsOn(iosMain)
}
@Suppress("UNUSED_VARIABLE")
val ios64Test by getting {
dependsOn(iosTest)
}
@Suppress("UNUSED_VARIABLE")
val iosSimTest by getting {
dependsOn(iosTest)
}
}
}
Now, when I make a publication, it publishes two separate native components for iOS, basically, for both iossim
, and ios64
. What's the standard way to do this, such that I can only publish the native library called native
, and no iossim
, ios64
. I feel like I'm missing a link here somewhere... All the sources are in iosMain
, and iosTest
foldersKris Wong
10/21/2019, 7:49 PMSujit
10/21/2019, 7:49 PMKris Wong
10/21/2019, 7:50 PMSujit
10/21/2019, 7:50 PMKris Wong
10/21/2019, 7:51 PMSujit
10/21/2019, 7:52 PM.jar
, .klib
, and .pom
that it publishes for iosSimulator
, and iosDevice
at the momentnative
the library published by other libraries like serialization
, ktor
, and so on, and what am I doing wrong because of which, I'm publishing multiple things for just iOS
Kris Wong
10/21/2019, 7:55 PMSujit
10/21/2019, 7:57 PMklib
to download in terms of architecture when we ask native
, but I'm not sure how I can publish that"org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${Config.version.coroutines}"
, which works on all native platforms, without having to specify separate dependencies for iosx64
, or iosarm64
and so on...Kris Wong
10/21/2019, 8:08 PMSujit
10/21/2019, 8:20 PMklib
is wrong in itself. May be I should publish something that is architecture independent, like I do for android, which when used in other KMP project, compiles to klib
¯\_(ツ)_/¯ribesg
10/22/2019, 8:08 AM