is it possible to tell k/native via gradle plugin ...
# kotlin-native
k
is it possible to tell k/native via gradle plugin where to find cinterop klibs on a remote maven repo without experimental gradle metadata enabled? With metadata enabled it finds the cinterop klibs on bintray fine but this causes other issues with the jvm platform projects. Disabling metadata leads to
error: compilation failed: Could not find "XX-cinterop-YY" in [...]
. Is metadata enabled required to resolve cinterop klibs uploaded to a maven repo?
d
Gradle uses metadata to decide which specific klib the target requires. Without metadata, you have to refer to specific klib. Like
kotlinx-io-mingwX64
instead of
kotlinx-io-native
.
k
right, but the cinterop files are embedded inside the artifact for the library itself. how do i point it at the cinterop klib?
d
OH. You want the cinterop files. I don't think that is possible.
k
for example, here's my library published to bintray called `koma-core-cblas`: https://bintray.com/kyonifer/maven/koma#files/com%2Fkyonifer%2Fkoma-core-cblas-macosX64. If I depend on the specific variant (macosX64) it finds the library fine, but it cant find the klibs for the cinterops that are inside of it
d
What do you mean you can't find the klibs? It's not showing up in the gradle window?
k
I get the above error during compilation from gradle stating it cannot find the cinterop klibs
if i curl them to the disk manually it works fine... if i enable gradle metadata it works fine
the latter option breaks my jvm multiplatform projects though (which work without metadata enabled 😞 )
d
Ah I see! I had the same problem when publishing to local repo. Couldn't fix it. 😬
k
ah gotcha... well thanks for taking a look
d
Actually, what version of gradle are you using?
4.7? On both ends?
k
yes 4.7 on both sides, trying to match the metadata format used by the other kotlin libs
i may just hack in a couple of
curl
calls from gradle for now, and hope the publishing situation smooths itself out over time
d
That should work for now.
n
Wonder if the publishing situation will be resolved by the time Gradle Kotlin DSL support for the multi-platform plugin arrives (in stable form).
m