JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.27k stars 1.18k forks source link

POM file for org.jetbrains.compose.desktop:desktop seems to point to .aars that do not exist #2013

Closed WilliamHester closed 1 month ago

WilliamHester commented 2 years ago

I'm trying to set up Jetpack Compose with an existing Bazel project. So far, I've been unable to get the dependencies to even sync. I'm currently trying with org.jetbrains.compose.desktop:desktop-jvm-macos-arm64:1.1.1. However, when I add that sole dependency to my project I'm getting the error:

Error fetching artifacts:
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-graphics/1.1.1/ui-graphics-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-graphics/1.1.1/ui-graphics-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/runtime/runtime-saveable/1.1.1/runtime-saveable-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/runtime/runtime-saveable/1.1.1/runtime-saveable-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material/1.1.1/material-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material/1.1.1/material-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-tooling-preview/1.1.1/ui-tooling-preview-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-tooling-preview/1.1.1/ui-tooling-preview-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material-icons-core/1.1.1/material-icons-core-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material-icons-core/1.1.1/material-icons-core-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/animation/animation-core/1.1.1/animation-core-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/animation/animation-core/1.1.1/animation-core-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/foundation/foundation-layout/1.1.1/foundation-layout-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/foundation/foundation-layout/1.1.1/foundation-layout-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui/1.1.1/ui-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui/1.1.1/ui-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material-ripple/1.1.1/material-ripple-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/material/material-ripple/1.1.1/material-ripple-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/runtime/runtime/1.1.1/runtime-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/runtime/runtime/1.1.1/runtime-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-geometry/1.1.1/ui-geometry-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-geometry/1.1.1/ui-geometry-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/animation/animation/1.1.1/animation-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/animation/animation/1.1.1/animation-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-text/1.1.1/ui-text-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-text/1.1.1/ui-text-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/foundation/foundation/1.1.1/foundation-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/foundation/foundation/1.1.1/foundation-1.1.1.aar
https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-unit/1.1.1/ui-unit-1.1.1.aar: not found: https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-unit/1.1.1/ui-unit-1.1.1.aar

Glancing at the .pom file for the dependency, I see that it depends on org.jetbrains.compose.desktop:desktop:1.1.1, which lists dependencies like:

    <dependency>
      <groupId>org.jetbrains.compose.foundation</groupId>
      <artifactId>foundation</artifactId>
      <version>1.1.1</version>
      <scope>runtime</scope>
      <type>aar</type>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.compose.material</groupId>
      <artifactId>material</artifactId>
      <version>1.1.1</version>
      <scope>runtime</scope>
      <type>aar</type>
    </dependency>

However, note that org.jetbrains.compose.foundation lists a .jar file but not a .aar file, as the desktop package suggests would exist. This seems to be true for everything.

I'm guessing that somewhere, Gradle is actually automatically correcting the file extension, which allows the examples to work, but it is preventing Bazel from working.

uipko commented 2 years ago

I have the same issue with version 1.1.0.

I'm using a local maven repository only (no internet connection). The JARs are available in this repo but Gradle complains it cannot find the AAR. Which is expected because the AARs are not available in the local repo.

Running this same setup against online repositories does work. So it seems that Gradle does some magic here, but I've no idea why this magic does not work with my local mavan repo.

I checked the current dev version 1.2.0-alpha01-dev755. This versions seems to have the same issue.

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.