question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: for multiplatform deps, only include target platform

See original GitHub issue

If a kotlin multiplatform lib is depended on and has, say, org.jetbrains.compose:runtime as a common dependency, it gets included in an android dependency guard classpath even though there is no android platform exposed for that dep.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ZacSweerscommented, Oct 13, 2022

I looked a little more closely at it and I think this is actually “correct” by the letter of the gradle law. There is an android compose-jb artifact, but it’s just a shim pointing at the real androidx compose dep

+--- org.jetbrains.compose.runtime:runtime:1.2.0
|    \--- androidx.compose.runtime:runtime:1.2.1 -> 1.3.0-rc01 (*)
0reactions
handstandsamcommented, Oct 11, 2022

☝️ I included a list of configurations that could be depended on. In the example above, you would probably only need the jvm configuration to exclude, but with HMPP (https://kotlinlang.org/docs/multiplatform-hierarchy.html) you might be depending on multiple parent configs.

The intersection result is I think what you’d be looking for here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring a multiplatform app - Apple Developer
Share project settings and code across platforms in a single app target.
Read more >
Support cross-platform development · Issue #4 - GitHub
As another sample of the problem I am running the pry gem on Mac, Linux and Windows. The Windows gem dependency includes win32console...
Read more >
How to add project dependencies to specific platform targets ...
So, for example, in a Kotlin/JVM single-target project, you can just use a project("...") dependency on a Multiplatform project:
Read more >
Eclipse Target Platform - Tutorial - Vogella.com
You can define a target platform based on (p2) update sites and the file system. The Eclipse Maven tooling also add the option...
Read more >
Faster Multi-Platform Builds: Dockerfile Cross-Compilation ...
Now when two go build processes run they already have access to the pre-pulled dependencies. We also copied only the go.mod and go.sum...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found