https://kotlinlang.org logo
#kotlindl
Title
# kotlindl
p

Peter

10/02/2023, 6:20 AM
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

Pavel Gorgulov

10/02/2023, 6:33 AM
It seems like a multiplatform issue. Which kotlin version were you using?
p

Peter

10/02/2023, 6:35 AM
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

roman.belov

10/02/2023, 7:48 AM
As a workaround you may try to specify directly '-jvm' package, and check if it works
👍 1
p

Peter

10/02/2023, 7:55 AM
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

Pavel Gorgulov

10/02/2023, 8:48 AM
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