Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplatform seems to break Android builds. #34

Closed
Tolriq opened this issue Dec 28, 2021 · 4 comments
Closed

Multiplatform seems to break Android builds. #34

Tolriq opened this issue Dec 28, 2021 · 4 comments

Comments

@Tolriq
Copy link

Tolriq commented Dec 28, 2021

> Could not resolve all artifacts for configuration ':modules:ui-bottomsheet-displayconfiguration:debugRuntimeClasspath'.
   > Could not find org.jetbrains.compose.runtime:runtime:1.0.1-rc2.
     Required by:
         project :modules:ui-bottomsheet-displayconfiguration > cafe.adriel.voyager:voyager-core:1.0.0-beta14 > cafe.adriel.voyager:voyager-core-android-debug:1.0.0-beta14
         project :modules:ui-bottomsheet-displayconfiguration > cafe.adriel.voyager:voyager-navigator:1.0.0-beta14 > cafe.adriel.voyager:voyager-navigator-android-debug:1.0.0-beta14
   > Could not find org.jetbrains.compose.ui:ui:1.0.1-rc2.
     Required by:
         project :modules:ui-bottomsheet-displayconfiguration > cafe.adriel.voyager:voyager-core:1.0.0-beta14 > cafe.adriel.voyager:voyager-core-android-debug:1.0.0-beta14
         project :modules:ui-bottomsheet-displayconfiguration > cafe.adriel.voyager:voyager-navigator:1.0.0-beta14 > cafe.adriel.voyager:voyager-navigator-android-debug:1.0.0-beta14

Is there a new way to handle the deps? I do not want jetbrain compose in the android app.

@egorikftp
Copy link

The same for me

@DevSrSouza
Copy link
Collaborator

Apparently Jetbrains Compose is not replacing the dependencies on gradle module metadata file, it is only on the pom file.

The only solution as a User that I can think is using excluding transitive dependencies like this: implementation("cafe.adriel.voyager:voyager-core-android-debug:1.0.0-beta14") { isTransitive = false }
Can you try that to see if this solution work for you?

The solution as a project level it would by excluding compose dependencies from the publishing on Gradle Module Metadata.

Good references for this:
https://blog.jetbrains.com/kotlin/2021/10/compose-multiplatform-goes-beta/#androidartifacts
https://jakewharton.com/multiplatform-compose-and-gradle-module-metadata-abuse/

@DevSrSouza
Copy link
Collaborator

Testing here I found out that the Jetbrains Compose plugins is already replacing correctly but Gradle is only replacing it on the pom file for some reason, seems to be a Gradle issue.

gradle/gradle#19452

@adrielcafe
Copy link
Owner

Fixed in 1.0.0-beta15. Thanks for your help @DevSrSouza !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants