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
30
30
31
31
benchmarkCompilation.apply {
32
32
val sourceSet = kotlinSourceSets.single()
33
+
33
34
sourceSet.kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
34
35
sourceSet.resources.setSrcDirs(files())
36
+
35
37
sourceSet.dependencies {
36
- implementation(compilation.compileDependencyFiles)
37
38
implementation(compilation.output.allOutputs)
38
39
implementation(npm(" benchmark" , " *" ))
39
40
runtimeOnly(npm(" source-map-support" , " *" ))
40
41
}
42
+ project.configurations.let {
43
+ it.getByName(sourceSet.implementationConfigurationName).extendsFrom(
44
+ it.getByName(compilation.compileDependencyConfigurationName)
45
+ )
46
+ }
47
+
41
48
compileKotlinTask.apply {
42
49
group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
43
50
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
66
66
67
67
benchmarkCompilation.apply {
68
68
val sourceSet = kotlinSourceSets.single()
69
+
69
70
sourceSet.resources.setSrcDirs(files())
70
- // TODO: check if there are other ways to set compiler options.
71
- this .kotlinOptions.freeCompilerArgs = compilation.kotlinOptions.freeCompilerArgs
72
71
sourceSet.kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
72
+
73
73
sourceSet.dependencies {
74
- implementation(compilation.compileDependencyFiles)
75
74
implementation(compilation.output.allOutputs)
76
75
}
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
77
84
}
78
85
79
86
compilationTarget.apply {
You can’t perform that action at this time.
0 commit comments