mbonnin
08/07/2023, 12:28 PMhho
08/07/2023, 12:42 PMmbonnin
08/07/2023, 12:45 PM// add JVM target
val jvmTarget = kotlin.jvm()
// add a compilation to the JVM target
val myCompilation = jvmTarget.compilations.create("myCompilation")
// get the default source set for this comilation
myCompilation.defaultSourceSet
mbonnin
08/07/2023, 12:46 PMsource code that has dependenciesAt the end you need to pass those dependencies to the compiler and compile a "set" of "sourceSets" altogether? Or at least this is my mental model
ephemient
08/07/2023, 12:54 PMmbonnin
08/07/2023, 12:56 PMdependsOn
and can get the dependencies as it goes 👍 Makes sense, thanks!mbonnin
08/07/2023, 12:58 PMephemient
08/07/2023, 12:59 PMtapchicoma
08/07/2023, 2:11 PMdefaultKotlinSourceSet
via one compilation task.
Indeed it could include additional sources from shared KotlinSourceSet
.
KotlinTarget
may contain 1 or more KotlinCompilation
. Usually it is two - production code and test code compilations.mbonnin
08/07/2023, 2:14 PMjvm
target, will its default source set depend on commonMain
by default or do I have to wire that myself?tapchicoma
08/07/2023, 2:17 PMmbonnin
08/07/2023, 2:17 PMtapchicoma
08/07/2023, 2:18 PMmbonnin
08/07/2023, 2:18 PMmbonnin
08/07/2023, 2:19 PMmbonnin
08/07/2023, 2:20 PMcommonMain
, we would end up with duplicate symbols because the Kotlin models are configured there already