https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

rnett

04/25/2021, 7:24 AM
A bit of a weird question, but I have a multiplatform project with two JVM source sets and a common source set. I'm using expect actual, so I can't split them into separate projects. I'm trying to depend on one source set. This is easy enough to do via the artifact id, but does not seem possible to do via a gradle
project
dependency, which is what I need. Is there any way to do this?
It does not seem like there are enough attributes provided to gradle to do by-name resolution, leading to errors like this: https://gist.github.com/rnett/8ec3886b412d64f41f6120339dbd4390
r

russhwolf

04/25/2021, 3:44 PM
It’s a little clunky but you can add your own attributes to disambiguate: https://kotlinlang.org/docs/mpp-set-up-targets.html#distinguish-several-targets-for-one-platform
r

rnett

04/25/2021, 7:02 PM
yeah, that's what I've been doing, I didn't see that page when I was looking
3 Views