Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

kotlin-multiplatform and Gradle 4.10 #54

Open
Dkhusainov opened this issue Oct 7, 2018 · 9 comments
Open

kotlin-multiplatform and Gradle 4.10 #54

Dkhusainov opened this issue Oct 7, 2018 · 9 comments

Comments

@Dkhusainov
Copy link

What's the ETA for supporting new kotlin-multiplatform plugin and 0.4 version of gradle metadata? Right now if I try to import kodein ina kotlin-multiplatform with Gradle 4.10, it gives me an error Unsupported format version 0.3 specified in module metadata. This version of Gradle supports format version 0.4 only. Some other dependencies in my module are already using 0.4, so I can't use the library.

@kpgalligan
Copy link
Contributor

@Dkhusainov Prep for Kotlinconf ate up the last week or 2 of time on my end. I'm looking at the new mpp today, although the examples I see are all still tied to gradle 4.7 (and as a consequence module 0.3). Are your other dependencies multiplatform with native, and if so, can you send links? The plugins are super new, so the docs tend to be bad. Example projects are pretty much the only way to make progress.

As far as moving from the platform plugin to the new multiplatform plugin format for knarch, that's a bit more difficult. We're actually compiling C++ against the K/N runtime, then manually assembling the C++ output into the klib, which is very non-standard. That may prove more difficult with the new plugin. Moving from the Konan plugin to the platform plugin was pretty time consuming.

@kpgalligan
Copy link
Contributor

For example, one of the most significant examples of the mpp are the Kotlinconf app, which is still gradle 4.7: https://github.com/JetBrains/kotlinconf-app/blob/android-app-mpp/gradle/wrapper/gradle-wrapper.properties

@Dkhusainov
Copy link
Author

Thanks for rapid response. Current Sqldelight SNAPSHOT supports new mpp and gradle 4.10. Seeing as the main(or one of main) purpose of the library is to provide driver for Sqldelight, It makes sense to upgrade.

@kpgalligan
Copy link
Contributor

If you have other examples, of a native dependency working with Gradle 4.10, please forward. Sqldelight is sort of an ongoing discussion. I chat with Alec fairly regularly over slack about progress, although it doesn't usually bubble up into github discussions. The short version is there have been issues with the Kotlin/Native side of the gradle plugins and dependencies. I've lost a couple weeks of time over the last few months trying to upgrade gradle plugins to whatever bleeding edge is from Jetbrains, only to find out Native isn't 100% in pace with the other parts of multiplatform (or whatever).

Concurrent, there's my branch of sqldelight with a functional driver, and there's Jake and Alec's work going into making a more formal sqldelight driver, which is ongoing. I have some updated thoughts on concurrency techniques and K/N which I'm sending over to them in the next week or so.

Anyway, for ETA on mpp with 4.7, I should have the droidcon app updated pretty soon (possibly today, maybe tomorrow). Gradle 4.10? I'm going to hold out for a bit until I see something from Jetbrains actual that supports native, mpp, and Gradle 4.10, as a dependency, unless I wind up with a surplus of free time to try exploring that myself (again). K/N and Gradle 4.10 dependency resolution was explicitly not working as of roughly last week, but getting clarity on the situation hasn't always been easy, and that whole team was understandably busy with Kotlinconf. We'll see how the next couple weeks pan out.

@kpgalligan
Copy link
Contributor

Summary, if I'm behind on current events and K/N deps work with Gradle 4.10, then I'll be updating this week. If not, it'll depend on that, but since Kotlinconf is over, I'll need to find another best-source-of-current-truth example app from Jetbrains.

@Dkhusainov
Copy link
Author

Dkhusainov commented Oct 7, 2018

Okay, thanks for the insights. I'll use your sqldelight and gradle 4.7. Does current version of the driver works with new mpp?

@kpgalligan
Copy link
Contributor

That's what today is about. Trying to update the droidcon app. I stopped short of doing that pre-Kotlinconf because the slides weren't going to make themselves, but now that the conf is over, no excuses. However, the new mpp plugin has basically 2 forms for dependencies. The "compact" form where you can specify the dependency in common and that's it, and the "exploded" form, where dependencies are put on each config. That's how Kotinconf's config works now, and I suspect that's how knarch (and everything else I'm publishing) will look for the near term.

We'll see. I'll update if progress happens.

@Dkhusainov
Copy link
Author

I don't think anybody cares about 1 or 4 lines of same dependency in the same file as long as it's actually works. Thanks for you work, waiting with anticipation for the plugin update.

@kpgalligan
Copy link
Contributor

Took a bit, but updated. Multiplatform build for Droidcon functional on Android and ios: https://github.com/touchlab/DroidconKotlin/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants