zt
10/31/2023, 4:58 AMlinuxX64("linux") {
binaries {
executable("prism") {
entryPoint = "main"
}
}
}
Jeff Lockhart
10/31/2023, 6:29 AMlinuxX64 {
binaries {
executable("prism") {
entryPoint = "main"
}
}
}
linuxArm64 {
binaries {
executable("prism") {
entryPoint = "main"
}
}
}
If you don't have any custom source set hierarchy applied, then you can use the default template to have both linuxX64 and linuxArm64 depend on the linux source set. With Kotlin <1.9.20 you can apply the default template with:
targetHierarchy.default()
Or it will be applied by default in Kotlin 1.9.20.zt
10/31/2023, 8:18 PMJeff Lockhart
11/01/2023, 6:55 AMlistOf(
linuxX64(),
linuxArm64()
).forEach {
it.binaries {
executable("prism") {
entryPoint = "main"
}
}
}
zt
11/01/2023, 8:07 PMkotlin {
listOf(
linuxX64(),
linuxArm64()
).forEach {
it.binaries {
executable("prism") {
entryPoint = "main"
}
}
}
sourceSets {
linuxMain {
dependencies {
implementation(projects.common)
implementation(libs.clikt)
implementation(libs.kotlin.coroutines.core)
implementation(libs.bundles.ktoml)
implementation(libs.bundles.ktor)
}
}
}
}
Cannot access 'com.akuleshov7.ktoml.source.TomlSourceReader' which is a supertype of 'com.akuleshov7.ktoml.file.TomlFileReader'. Check your module classpath for missing or conflicting dependencies
And my c interop is missingkotlin.mpp.enableCInteropCommonization=true
plugins {
alias(libs.plugins.kotlin.multiplatform)
}
kotlin {
listOf(
linuxX64(),
linuxArm64()
).forEach {
it.compilations.getByName("main") {
cinterops.create("xlib")
}
}
}
Jeff Lockhart
11/01/2023, 10:06 PMzt
11/01/2023, 10:36 PMCaused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of com.github.ajalt.clikt:clikt:4.2.1 was found. The consumer was configured to find a library for use during 'kotlin-metadata', 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 'linux_arm64' but:
- Variant 'jsApiElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a library for use during 'kotlin-api':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'jsRuntimeElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a library:
- Incompatible because this component declares a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component for use during 'kotlin-metadata', 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'jsSourcesElements-published' capability com.github.ajalt.clikt:clikt:4.2.1:
- Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a library for use during 'kotlin-metadata', 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'jvmApiElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a library for use during compile-time:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'jvmRuntimeElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a library for use during runtime:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'jvmSourcesElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a component for use during runtime:
- Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, 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 org.jetbrains.kotlin.native.target (required 'linux_arm64')
- Variant 'linuxX64ApiElements-published' capability com.github.ajalt.clikt:clikt:4.2.1 declares a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'linux_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'linux_arm64'
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
Jeff Lockhart
11/01/2023, 10:49 PMzt
11/01/2023, 10:49 PMJeff Lockhart
11/01/2023, 10:58 PM