kitto
02/10/2023, 12:26 PMval iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
dependencies {
//
}
}
can I achieve this processor arch separation for Android too? (androidNativeArm64?)
(I'm trying to add some C static compiled library with kotlin-native cinterop)ephemient
02/10/2023, 12:33 PMandroidNativeArm32
androidNativeArm64
androidNativeX86
androidNativeX64
kitto
02/10/2023, 12:58 PMlistOf(
androidNativeArm64(),
androidNativeArm32(),
androidNativeX64(),
androidNativeX86()
).forEach {
it.binaries.framework {
baseName = "shared"
}
it.compilations.getByName("main") {
cinterops {
val libssl by creating
}
}
}
I'm getting a build error : java.lang.IllegalArgumentException: Cannot create a framework: debugFramework. Binaries of this kind are not available for target androidNativeArm64
(I unfortunately don't really know what I'm doing in regard to gradle builds)ephemient
02/10/2023, 1:09 PMbinaries.framework
is only for Objective-C (macos, ios). use binaries.sharedLib
for other platformskitto
02/10/2023, 1:34 PM> No matching variant of io.ktor:ktor-client-core:2.2.2 was found. The consumer was configured to find a usage of 'kotlin-cinterop' of a library, with the library elements 'cinterop-klib', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'android_arm64' but:
- Variant 'commonMainMetadataElements' capability io.ktor:ktor-client-core:2.2.2 declares a usage of 'kotlin-api' of a library:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
- Doesn't say anything about its elements (required them with the library elements 'cinterop-klib')
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'android_arm64')
ephemient
02/10/2023, 1:36 PMkitto
02/10/2023, 1:42 PMephemient
02/10/2023, 1:42 PMkitto
02/10/2023, 2:26 PMEvegenii Khokhlov
02/11/2023, 7:31 AM