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
15.95k stars 1.16k forks source link

Desktop artifact dependencies should not be of type aar #479

Open jimgoog opened 3 years ago

jimgoog commented 3 years ago

Looking at the dependencies of many of the maven artifacts (eg. https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/desktop/desktop/0.3.2/desktop-0.3.2.pom) we see that dependencies are declared like:

    <dependency>
      <groupId>org.jetbrains.compose.runtime</groupId>
      <artifactId>runtime</artifactId>
      <version>0.3.2</version>
      <scope>compile</scope>
      <type>aar</type>
    </dependency>

But this is really weird because desktop does not use aars and so specifying the type as such can confuse the build systems.

tadfisher commented 3 years ago

Gradle will ignore the POMs and use the .module metadata file for resolution, which is probably why it works in Gradle. The files array looks like it specifies .jar dependencies and each variant is specifying the "org.gradle.libraryelements": "jar" attribute so that's the artifact that's resolved at build time.

igordmn commented 3 years ago

I think we should write the right type ("jar"). Even if "aar" works, it is not right :).

olonho commented 3 years ago

Is it something to be fixed in publishing task, right?

igordmn commented 3 years ago

Is it something to be fixed in publishing task, right?

Yes, probably here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:buildSrc/src/main/kotlin/androidx/build/MavenUploadHelper.kt;l=227;bpv=0

Kernald commented 2 years ago

This is still a blocking issue with 1.0.0-beta5 from Maven Central using other build systems than Gradle.

okushnikov commented 3 weeks ago

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