File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed
plugin/main/src/kotlinx/benchmark/gradle Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,21 @@ private fun Project.createJsBenchmarkCompileTask(target: JsBenchmarkTarget): Kot
31
31
32
32
benchmarkCompilation.apply {
33
33
val sourceSet = kotlinSourceSets.single()
34
+
34
35
sourceSet.kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
35
36
sourceSet.resources.setSrcDirs(files())
37
+
36
38
sourceSet.dependencies {
37
- implementation(compilation.compileDependencyFiles)
38
39
implementation(compilation.output.allOutputs)
39
40
implementation(npm(" benchmark" , " *" ))
40
41
runtimeOnly(npm(" source-map-support" , " *" ))
41
42
}
43
+ project.configurations.let {
44
+ it.getByName(sourceSet.implementationConfigurationName).extendsFrom(
45
+ it.getByName(compilation.compileDependencyConfigurationName)
46
+ )
47
+ }
48
+
42
49
compileKotlinTask.apply {
43
50
group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
44
51
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 {
Original file line number Diff line number Diff line change @@ -32,10 +32,15 @@ private fun Project.createWasmBenchmarkCompileTask(target: WasmBenchmarkTarget):
32
32
with (kotlinSourceSets.single()) {
33
33
kotlin.setSrcDirs(files(" $benchmarkBuildDir /sources" ))
34
34
resources.setSrcDirs(files())
35
+
35
36
dependencies {
36
- implementation(compilation.compileDependencyFiles)
37
37
implementation(compilation.output.allOutputs)
38
38
}
39
+ project.configurations.let {
40
+ it.getByName(this .implementationConfigurationName).extendsFrom(
41
+ it.getByName(compilation.compileDependencyConfigurationName)
42
+ )
43
+ }
39
44
}
40
45
compileKotlinTask.apply {
41
46
group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
You can’t perform that action at this time.
0 commit comments