Hi, i’m new with multiplatform, I have a subproject using only jvm kotlin but i can’t figure out how to add dependencies to it. When i try to build or run, i just get “Unresolved reference” on every external dependencies.
Here is my root project build.gradle.kts
buildscript {
dependencies {
classpath("com.android.tools.build:gradle:7.4.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
}
}
plugins {
kotlin("multiplatform") version "1.8.10"
application
kotlin("plugin.serialization") version "1.8.10"
}
repositories {
mavenCentral()
}
and here is my server (subproject)/build.gradle.kts
plugins {
kotlin("multiplatform")
application
kotlin("plugin.serialization")
}
group = "app.moreo"
version = "unspecified"
repositories {
mavenCentral()
}
kotlin {
jvm {
dependencies {
implementation(project(":wordsduel-serializations"))
implementation("io.javalin:javalin:5.4.2")
implementation("io.github.cdimascio:dotenv-kotlin:6.4.1")
implementation("org.ktorm:ktorm-core:3.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
implementation("org.ktorm:ktorm-support-postgresql:3.6.0")
implementation("org.postgresql:postgresql:42.5.4")
implementation("com.password4j:password4j:1.7.0")
}
withJava()
}
sourceSets {
this["jvmMain"].dependencies {
implementation(project(":wordsduel-serializations"))
implementation("io.javalin:javalin:5.4.2")
implementation("io.github.cdimascio:dotenv-kotlin:6.4.1")
implementation("org.ktorm:ktorm-core:3.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
implementation("org.ktorm:ktorm-support-postgresql:3.6.0")
implementation("org.postgresql:postgresql:42.5.4")
implementation("com.password4j:password4j:1.7.0")
}
}
}
I can’t figure out why it’s not working, tell me if you need anything