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

basher

05/29/2019, 6:55 PM
Can you have a mulitplatform project with a Multiplatform subproject and avoid publishing an extra binary for the subproject? I'd like it all to end up in a single AAR, but it seems no matter what I do, the sub-project module shows up in the gradle module metadata, and then dependency resolution fails when I try to use the multi-project library
d

Dominaezzz

05/29/2019, 6:56 PM
I don't think this is possible, unless your project is publishing binaries.
b

basher

05/29/2019, 6:57 PM
overall project publishes an aar
d

Dominaezzz

05/29/2019, 6:58 PM
I can assure you that you'd have to do some ugly hack.
😭 1
Why have the subproject be separate?
Why not stick it in a different package?
b

basher

05/29/2019, 6:59 PM
I want to pull it into a subproject as a step toward open-sourcing some code
d

Dominaezzz

05/29/2019, 6:59 PM
Oh... so you're gonna publish it anyway. 😂
b

basher

05/29/2019, 6:59 PM
So it will be eventually. It seemed like this was a good option as a step toward doing that. Turns out I then I have to publish again anyway
d

Dominaezzz

05/29/2019, 7:01 PM
Can I ask what the subproject is (gonna be)?
b

basher

05/29/2019, 7:05 PM
Sure! Working on open-sourcing the worker code that lets us run multi-threaded coroutine-type code in common code. It's not perfect, but it's keeping us out of the "no multi-threaded coroutines in native" hole
👍 1
d

Dominaezzz

05/29/2019, 7:08 PM
Interesting, I can't wait to see your approach. I've been postponing multi-threading for ages because I can't be arsed to freeze things.
🙏 1
b

basher

05/29/2019, 7:09 PM
Spoiler: it freezes things
I think that model needs some improvement around tooling (improved error messages, improved data structures that showcase how to work in this model, etc.), but once you learn the tricks to working with frozen structures, it's not so bad. just forces you to think differently about your problems
d

Dominaezzz

05/29/2019, 7:15 PM
Agreed
l

louiscad

05/30/2019, 5:50 AM
Subprojects are like sibling projects. If you depend on them, you need to publish them too.
👍 1