Is there a way in MPP to declare source sets that ...
# multiplatform
e
Is there a way in MPP to declare source sets that represent separate compilation units and don’t clash with the default source sets? Here’s the idea:
Copy code
kotlin {
  jvm() {
    withJava()
  }
  sourceSets {
    commonMain {
      // Declares class Person in platform-agnostic Kotlin
    }
    jvmKotlinInteropMain {
      dependsOn jvmMain
      // Declares class Person with Java interop annotations
    }
    jvmJavaMain {
      dependsOn jvmMain
      // Declares class Person written in Java
    }
  }
}