r4zzz4k
09/05/2018, 2:03 PMorg.jetbrains.kotlin.multiplatform
and stumbling upon the following issue. Quoting sample repo:
A project dependency on another MPP project has the same semantics and is also resolved in a variant-aware way:
```dependencies { implementation project(':my-mpp-lib') }
So I have `settings.gradle` mentioning
include(":a")
include(":b")
Then in `a/build.gradle`:
plugins {
id("org.jetbrains.kotlin.multiplatform")
}
kotlin {
targets {
fromPreset(presets.linuxX64, 'native')
}
...
}
and in `b/build.gradle`:
plugins {
id("org.jetbrains.kotlin.multiplatform")
}
kotlin {
targets {
fromPreset(presets.linuxX64, 'native')
}
sourceSets {
commonMain {
dependencies {
...
implementation project(':a')
}
}
}
}
When I try to run `./gradlew :b:compileKotlinNative`, I get the following error:
exception: java.lang.IllegalStateException: Could not find "a" in [$PROJ_DIR, $PROJ_DIR/a/build/classes/kotlin/native/main, $HOME/.konan/klib, $HOME/.konan/kotlin-native-linux-0.8.2/klib/common, $HOME/.konan/kotlin-native-linux-0.8.2/klib/platform/linux_x64].
```
Looking into $PROJ_DIR/a/build/classes/kotlin/native/main
I see a file named a-native.klib
.
So the question is, how can I make this work? Do I have to somehow override suffix of klib
or dependency, or is it a bug and the plugin should do this itself?api
configuration.