Kotlin / multik

Multidimensional array library for Kotlin
https://kotlin.github.io/multik/
Apache License 2.0
646 stars 39 forks source link

Wrongly packaged jar files published to Maven Central #151

Closed jbaron closed 1 year ago

jbaron commented 1 year ago

When I add multik (core + default) to my Maven pom file, I cannot use it since the import statements are not recognised.

When I looked into my local Maven repo for version 0.2.1 of multi-core using jar --list -f multik-core-0.2.1.jar, it seems the published jar file doesn't contain the right directory structures. Small snippet:

META-INF/
META-INF/MANIFEST.MF
META-INF/kotlin-project-structure-metadata.json
commonMain/
commonMain/default/
commonMain/default/manifest
commonMain/default/linkdata/
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/2_complex.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/4_complex.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/1_complex.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/3_complex.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.complex/0_complex.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx/
commonMain/default/linkdata/package_org.jetbrains.kotlinx/0_kotlinx.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.operations/
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.operations/1_operations.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.operations/0_operations.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.ndarray.operations/2_operations.knm
commonMain/default/linkdata/module
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.api.math/
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.api.math/1_math.knm
commonMain/default/linkdata/package_org.jetbrains.kotlinx.multik.api.math/0_math.knm

It looks like the packaging during deployment to Maven Central went wrong (or is this something only Gradle is able to parse)?

devcrocod commented 1 year ago

Do you have a multiplatform maven project? I'm not sure that maven works correctly with the multiplatform kotlin plugin and, accordingly, with multiplatform libraries. If your project is jvm only, then use direct dependency: org.jetbrains.kotlinx:multik-core-jvm:0.2.1

jbaron commented 1 year ago

Thanks !!! The direct dependency (multik-core-jvm) did the try for me and for now I'm using it only in a JVM only setup.