https://kotlinlang.org logo
k

kpgalligan

09/19/2018, 2:34 PM
Working through the new gradle plugin and trying to apply it to a project. I haven't reached the part where I try to get the framework to function, but I'll be there soon. Any examples of multiplatform with the new gradle plugin and an iOS app?
j

jw

09/19/2018, 2:35 PM
I have native library modules working in SQL Delight
l

Liliia

09/19/2018, 2:47 PM
Another sample for iOS is yet to come, but we are working on it right now 🙂
k

kpgalligan

09/19/2018, 3:03 PM
Thanks. See how this goes...
If you publish dependencies for the older platform plugin, the common and native artifacts would be separate publications, and would need to be separately listed as dependencies in downstream projects. The newer plugin lets you specify a dependency in the common module, and I assume the native module will know how to resolve that down to a klib artifact. However, is there a way to consume dependencies published with the older plugin, or does everything need to be republished with the newer plugin? If that's not clear, totally understand. Just figured I'd ask before trying to reconfigure all the dependency projects as well.
The project I'm porting can't find the native dependencies from the old plugin, even when explicitly listed in the native sourceSet dependencies section. I'm assuming that's because how maven publishing works has changed somewhat.
Would rather avoid port all the library projects, but I guess it has to happen at some point.
r

russhwolf

09/19/2018, 8:37 PM
This is something I’m pretty worried about as well. Right now there’s some risk of fracturing the community in weird ways if we’re not all publishing using the same plugin.
j

jw

09/19/2018, 8:38 PM
for SQL Delight we're shipping both. you can depend on the older artifacts for JS and JDK/Android inside their respective dependencies blocks
k

kpgalligan

09/19/2018, 8:38 PM
Hmm
ios isn't finding it, but I'm also not ruling out some misconfig
j

jw

09/19/2018, 8:39 PM
well iOS always required the new format, no? the new plugin just mixes in JS and JVM/Android into that mix
k

kpgalligan

09/19/2018, 8:41 PM
There's the new plugin, but there's also the platform plugin (the last plugin), then the konan plugin. My downstream project can't find ios dependencies published with the platform plugin, even is specified directly in the sourceSet config. Wondering if that should work, which means my config is not functional, or if that's not expected to work.
I think some of the updates to gradle will be pretty smooth, but I'm dreading the db one.
j

jw

09/19/2018, 8:58 PM
I thought konan was built on the .module format as well
k

kpgalligan

09/19/2018, 9:03 PM
Don't know, but I'm far from an expert on that. Part of my issue here is trying to avoid the need to become and expert on that.
Another related problem, I was publishing libs with gradle 4.7, and new examples are 4.10. If you use 4.10, it'll complain that module format is 0.3 from 4.7 and isn't compatible.
Expecting 0.4
Anyway, good times.
j

jw

09/19/2018, 9:06 PM
Yeah Gradle 4.8 bumped it to 0.4. That's another reason we're publishing JVM/Android and JS separately for SQL Delight. The unified multiplatform artifact will be experimental.
k

kpgalligan

09/19/2018, 9:11 PM
I feel like "mainstream" native will be far enough out that focusing on this new gradle format makes sense, but if I could get the current native libs to work I'd do that for now. Editing builds is not my favorite task.
h

h0tk3y

09/20/2018, 1:39 PM
However, is there a way to consume dependencies published with the older plugin, or does everything need to be republished with the newer plugin?
There's no possibility to do that at the moment, but there's work-in-progress to support that. For now, you need to republish the native artifacts.
🎉 1
k

kpgalligan

09/20/2018, 1:41 PM
Any eta? I'm going to attempt to reconfigure the projects I'm working on with the new plugin and just move forward with that, but if the WIP is coming in the next few days, may hold off.