File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
plugin/main/src/kotlinx/benchmark/gradle Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ package kotlinx.benchmark.gradle
2
2
3
3
import org.gradle.api.*
4
4
import org.gradle.api.tasks.*
5
+ import org.gradle.process.ExecOperations
5
6
import org.jetbrains.kotlin.gradle.plugin.mpp.*
6
7
import org.jetbrains.kotlin.konan.target.*
7
8
import java.io.File
8
9
import java.nio.file.Path
10
+ import javax.inject.Inject
9
11
import kotlin.io.path.*
10
12
11
13
fun Project.processNativeCompilation (target : NativeBenchmarkTarget ) {
@@ -144,7 +146,9 @@ fun Project.createNativeBenchmarkExecTask(
144
146
}
145
147
}
146
148
147
- open class NativeBenchmarkExec () : DefaultTask() {
149
+ open class NativeBenchmarkExec @Inject constructor(
150
+ private val execOperations : ExecOperations ,
151
+ ) : DefaultTask() {
148
152
/*
149
153
@Option(option = "filter", description = "Configures the filter for benchmarks to run.")
150
154
var filter: String? = null
@@ -173,7 +177,7 @@ open class NativeBenchmarkExec() : DefaultTask() {
173
177
lateinit var benchProgressPath: String
174
178
175
179
private fun execute (args : Collection <String >) {
176
- project .exec {
180
+ execOperations .exec {
177
181
it.executable = executable.absolutePath
178
182
it.args(args)
179
183
workingDir?.let { dir ->
You can’t perform that action at this time.
0 commit comments