KEMBAR78
Resolving Kotlin Multiplatform via Gradle Metadata (AndroidX) · Issue #864 · bazel-contrib/rules_jvm_external · GitHub
Skip to content

Resolving Kotlin Multiplatform via Gradle Metadata (AndroidX) #864

@cpsauer

Description

@cpsauer

Hi wonderful Bazelers,

It looks like some of Android's Jetpack libraries (androidx) are starting to switch over to to Kotlin Multiplatform, which involves publishing (nearly) empty jars to Maven and then relying on Gradle metadata to resolve the actual coordinates. This breaks builds upon updating the libraries, since naively pulling the next version will now pull down the now empty JARs. I figured I should report in as soon as I figured out what was breaking our build in case it would be useful to others.

The quick workaround is just to depend on the jvm variant of the coordinates. For example androidx.annotation:annotation -> androidx.annotation:annotation-jvm.

But it'd be nice to handle this automatically so that people can use the canonical version and aren't confused into the future. For this jvm-focused repo, probably that involves just seeing if there's a -jvm version of the coordinate and transparently aliasing to that.

Cheers,
Chris

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