https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
e

elect

03/14/2023, 9:50 AM
I'm benchmarking my lib with
kotlinx-benchmark-runtime:0.4.3
and I'd like the
jvmBench
sources to extend the
jvmMain
, in order to avoid things as re-declaration of expected classes and so on In the readme, they simply write (in Groovy script)
Propagate dependencies and output from
main
sourceSet.
```dependencies {
benchmarksCompile sourceSets.main.output + sourceSets.main.runtimeClasspath
}```
how can I translate that to Kotlin DSL? Looking around at other examples, I tried the following, but without success:
Copy code
kotlin {
    targets {
        jvm {
            compilations {
                val main by getting
                val bench by creating {
                    defaultSourceSet {
                        dependencies {
                            implementation(main.compileDependencyFiles + main.output.classesDirs)
                        }
                    }
                }
            }
        }
    }
}
9 Views