When I add the Multik core and default to my POM f...
# kotlindl
p
When I add the Multik core and default to my POM file, IntelliJ doesn’t see the packages. I already reset the cache, rebuilt indexes and refresh the projects, but that didn’t fix it. So I cannot use/compile Multik related code. When I try to compile the same file with plain Maven outside IntelliJ, it works fine. So Maven sees the packages and classes inside the modules. I guess this is more an IntelliJ issue than Multik. But on the off-change that other people encountered this problem, anyone knows what might be causing this?
p
It seems like a multiplatform issue. Which kotlin version were you using?
p
kotlin 1.9.10 and jvmTarget 17
What I see in the error when trying to import, is that kotlinx is already not resolved. Will remove all multik from local maven repo and see if that helps.
Didn’t work. Pure maven correctly downloaded the modules again and compiled the file. But IntelliJ still cannot resolve the packages.
r
As a workaround you may try to specify directly '-jvm' package, and check if it works
👍 1
p
Didn’t think about that. Works like a charm, my imports are recognised again 🙂 Just for others facing same issue (for I now include mutik-kotlin-jvm instead of mutik-kotlin-default to keep it pure JVM):
Copy code
<dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>multik-core-jvm</artifactId>
            <version>0.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>multik-kotlin-jvm</artifactId>
            <version>0.2.2</version>
        </dependency>
p
We encountered this problem in 1.9.10, it appears on multiplatform libraries, plugin does not resolve the target artifact via common. Roman suggested everything correctly You can also update to the new version of kotlin - https://github.com/JetBrains/kotlin/releases/tag/v1.9.20-Beta2 Please note that this is still a beta
👍 1