https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
k

Konstantin Petrukhnov

09/13/2019, 7:49 AM
Trying to build kotlin llibrary project LibC that depends on other LibB. MPP, only common code in both projects. Got exception, when trying to build LibC: - Variant 'jvm-api' capability com.companylibb1.0.2: (full stacktrace in thread)
> Configure project :
Kotlin Multiplatform Projects are an experimental feature.
> Configure project :LibC
Kotlin Multiplatform Projects are an experimental feature.
> Configure project :LibC:LibC
Kotlin Multiplatform Projects are an experimental feature.
> Task :LibC:LibC:compileKotlinEmulator FAILED
> Task :LibC:runBuildTasks FAILED
> Task :release
Release process failed, reverting back any changes made by Release Plugin.
> Task :release FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':LibC:LibC:compileKotlinEmulator'.
> Could not resolve all files for configuration ':LibC:LibC:emulatorCompileKlibraries'.
> Could not resolve com.company:libb:1.0.2.
Required by:
project :LibC:LibC
> Unable to find a matching variant of com.company:libb:1.0.2:
- Variant 'jvm-api' capability com.company:libb:1.0.2:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'java-api-jars'.
- Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
- Variant 'jvm-runtime' capability com.company:libb:1.0.2:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'jvm'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'java-runtime-jars'.
- Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
- Variant 'metadata-api' capability com.company:libb:1.0.2:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'common'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.
Any ideas what I'm doing wrong? 🙂
Both projects are basically copies of this template: https://gist.github.com/petrukhnov/92b9475ce2c8ac6aeb2b8450e9dc268c
a

Alexey Belkov [JB]

09/18/2019, 9:22 AM
Is it stably reproduced? Can you please create an issue at http://kotl.in/issue with a sample project to reproduce? Thank you.
3 Views