Skip to content

klib packaging type should be supported with Maven/gradle resolvers #1391

Open
@smocherla-brex

Description

@smocherla-brex

Kotlin 2 discontinued JARs as a way to consume Kotlin/JS artifacts https://kotlinlang.org/docs/whatsnew20.html#discontinuing-legacy-kotlin-js-jar-artifacts. This also caused rules_kotlin to drop JS support https://github.com/bazelbuild/rules_kotlin/pull/1185/files. I'm currently looking to resurrect that here(and the gradle resolver helps there). While looking into it, I found that Kotlin Multiplatform maven artifacts for non-JVM platforms like JS use klib packaging type in pom.xml. An example here https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-js/1.10.1/kotlinx-coroutines-core-js-1.10.1.pom). Right now, if you try to pull such artifacts, they'll fail here.

Ideally the maven/gradle resolvers respect this packaging type and allow exposing these dependencies to Kotlin projects through a rule like kt_js_import which I'm trying to add back in the original PR. I'd be happy to look into this but wanted to create an issue first. This also needs the rules_kotlin change to go through first (so I'll have to wait for that before creating any PR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions