I created the basic Kotlin MPP project in IntelliJ and now I wanted to add a multiplatform UUID module from
The instructions say it should be as easy as:
Well, no luck. It does not want to retrieve the dependencies at all. It claims that it can not resolve the dependency.
What can be going wrong?
See also this line in the Readme:
This library publishes gradle module metadata, so you should have
enableFeaturePreview("GRADLE_METADATA") in your settings.gradle(.kts).
Which Gradle version do you use?
I have that line also in mijn
My Gradle version is 5.2.1… which is low and strange, because it is the one installed by IntelliJ during loading of project.
Does it work if you change the Gradle version in the Wrapper manually to the latest 5.6?
Yes! It works now.
So a pretty basic error.
However I was thrown off guard, because I use Gradle 5.6 in other projects, but I tried a simple new MPP project from the IntelliJ templates and it installed 5.2.1?
My IntelliJ build info is:
IntelliJ IDEA 2019.2.3 (Ultimate Edition)
Build #IU-192.6817.14, built on September 24, 2019
Licensed to [...]
Subscription is active until April 23, 2020
Runtime version: 11.0.4+10-b304.69 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Tried with the latest Kotlin plugin EAP: Kotlin 1.3.60 Early Access Preview. It uses Gradle 5.5.1 (at least in Multiplatform Library template). You’re welcome to try too.