Search code examples
kotlingradlekotlin-multiplatform

Dependencies for custom kotlin multiplatform project not in classpath


I have created a multiplatform lib, and published it to maven central. I wanted to test it, but it doesn't seem like Gradle is importing all the libraries that my multiplatform project needs.

My multiplatform project build file: https://github.com/jan-tennert/DiscordKM/blob/master/build.gradle.kts

I mean IntelliJ is importing the libraries: Click here

But in code I see something like that: Error

And the program won't start because of "Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: " errors

You can maybe try to import my project yourself: (maven central)

implementation("io.github.jan-tennert.discordkm:DiscordKM:0.1")

Solution

  • Nvm, I had to implement the common dependencies with api instead of implementation (on the multiplatform project side)