Skip to content

Commit 62a10f3

Browse files
ALikhachevAbduqodiri Qurbonzoda
authored andcommitted
Use ObjectFactory to create fileTree in NativeBenchmarkExec
1 parent d273646 commit 62a10f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/main/src/kotlinx/benchmark/gradle/NativeMultiplatformTasks.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package kotlinx.benchmark.gradle
22

33
import org.gradle.api.*
4+
import org.gradle.api.model.ObjectFactory
45
import org.gradle.api.tasks.*
56
import org.gradle.process.ExecOperations
67
import org.jetbrains.kotlin.gradle.plugin.mpp.*
@@ -148,6 +149,7 @@ fun Project.createNativeBenchmarkExecTask(
148149

149150
open class NativeBenchmarkExec @Inject constructor(
150151
private val execOperations: ExecOperations,
152+
private val objectFactory: ObjectFactory,
151153
) : DefaultTask() {
152154
/*
153155
@Option(option = "filter", description = "Configures the filter for benchmarks to run.")
@@ -191,7 +193,7 @@ open class NativeBenchmarkExec @Inject constructor(
191193
fun run() {
192194
// Get full list of running benchmarks
193195
execute(listOf(configFile.absolutePath, "--list", benchProgressPath, benchsDescriptionDir.absolutePath))
194-
val detailedConfigFiles = project.fileTree(benchsDescriptionDir).files.sortedBy { it.absolutePath }
196+
val detailedConfigFiles = objectFactory.fileTree().from(benchsDescriptionDir).files.sortedBy { it.absolutePath }
195197
val runResults = mutableMapOf<String, String>()
196198

197199
val forkPerBenchmark = nativeFork.let { it == null || it == "perBenchmark" }

0 commit comments

Comments
 (0)