-
Notifications
You must be signed in to change notification settings - Fork 458
Use JVM
platform if the source-set is shared between jvm and android-jvm targets
#4258
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
base: whyoleg/dgp-isMetadata
Are you sure you want to change the base?
Conversation
Could you please add a test for the scenario? At least a simple integration. |
I think we'll also need to adjust this code to support webMain (or, more generally, any shared WasmJS/JS source sets) - see #4116. I'm just sharing it as it comes to mind. We don't have to update the code in this PR, but maybe there's an elegant way of fixing the problem here too? |
As I remember, there is the same issue with JS+WasmJS sourceset in Kotlin Wrappers |
I don't think it's the same case — those are two different issues, and they have two underlying mechanisms/problems. Kotlin, at this moment, has the ability to have a shared source set, which is also analyzed not as The case with a shared source set between The case with |
The test is added in 1252dc9, and thanks to it, a bug was discovered (1a205ec), which is required to be fixed for the original changes to work correctly, as otherwise, |
blocked by #4263 |
…jvm and android-jvm
79d20ef
to
ffdd9f5
Compare
Depends on / Blocked by #4263
Found in #4240 (comment)
Coil, and maybe some other projects, have a custom shared source set which is shared between
jvm
andandroid
targets. Sometimes, in that case, JDK classes could be used in those source sets. While Kotlin doesn't officially support this use case:Still, IDEA does support this use case, and both types and KDoc links are resolved against the JDK classes:
WDYT about replicating this behavior in DGPv2, so that if there is a shared source set between
jvm
andandroid
, we will useJVM
instead ofcommon
platform during analysis?As mentioned in #4240 (comment), the same could be done on the user's side, which solves this issue.