File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
plugin/main/src/kotlinx/benchmark/gradle Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,21 @@ private fun Project.createJsBenchmarkCompileTask(target: JsBenchmarkTarget): Kot
3030
3131 benchmarkCompilation.apply {
3232 val sourceSet = kotlinSourceSets.single()
33+
3334 sourceSet.kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
3435 sourceSet.resources.setSrcDirs(files())
36+
3537 sourceSet.dependencies {
36- implementation(compilation.compileDependencyFiles)
3738 implementation(compilation.output.allOutputs)
3839 implementation(npm(" benchmark" , " *" ))
3940 runtimeOnly(npm(" source-map-support" , " *" ))
4041 }
42+ project.configurations.let {
43+ it.getByName(sourceSet.implementationConfigurationName).extendsFrom(
44+ it.getByName(compilation.compileDependencyConfigurationName)
45+ )
46+ }
47+
4148 compileKotlinTask.apply {
4249 group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
4350 description = " Compile JS benchmark source files for '${target.name} '"
Original file line number Diff line number Diff line change @@ -66,14 +66,21 @@ private fun Project.createNativeBenchmarkCompileTask(target: NativeBenchmarkTarg
6666
6767 benchmarkCompilation.apply {
6868 val sourceSet = kotlinSourceSets.single()
69+
6970 sourceSet.resources.setSrcDirs(files())
70- // TODO: check if there are other ways to set compiler options.
71- this .kotlinOptions.freeCompilerArgs = compilation.kotlinOptions.freeCompilerArgs
7271 sourceSet.kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
72+
7373 sourceSet.dependencies {
74- implementation(compilation.compileDependencyFiles)
7574 implementation(compilation.output.allOutputs)
7675 }
76+ project.configurations.let {
77+ it.getByName(sourceSet.implementationConfigurationName).extendsFrom(
78+ it.getByName(compilation.compileDependencyConfigurationName)
79+ )
80+ }
81+
82+ // TODO: check if there are other ways to set compiler options.
83+ this .kotlinOptions.freeCompilerArgs = compilation.kotlinOptions.freeCompilerArgs
7784 }
7885
7986 compilationTarget.apply {
You can’t perform that action at this time.
0 commit comments