jeff
02/01/2022, 8:07 PM"build/generated/ksp/*main*/kotlin"
to your sourceSets.
However I have a multiplatform project and the generated files are put in different folders depending on what target I'm building, e.g. "build/generated/ksp/*jvmMain*/kotlin"
or "build/generated/ksp/*jsMain*/kotlin"
. This is despite the fact that the actual code being processed is in commonMain
. Therefore, I don't know how I can make my code in commonMain
depend on generated code. Has anyone run into this?plugins {
kotlin("multiplatform") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
id("com.google.devtools.ksp") version "1.6.10-1.0.2"
application
}
repositories {
mavenCentral()
}
val arrowVersion = "1.0.3-alpha.1"
kotlin {
jvm {
}
js(IR) {
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("io.arrow-kt:arrow-core:$arrowVersion")
implementation("io.arrow-kt:arrow-optics:$arrowVersion")
configurations["ksp"].dependencies.add(project.dependencies.create("io.arrow-kt:arrow-optics-ksp-plugin:$arrowVersion"))
}
}
val commonTest by getting {
dependencies {
}
}
val jvmMain by getting {
dependencies {
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
}
}
val jsTest by getting
}
}
evant
02/01/2022, 8:19 PMjeff
02/01/2022, 8:26 PM