@@ -88,12 +88,14 @@ private fun Project.createNativeBenchmarkCompileTask(target: NativeBenchmarkTarg
88
88
this .compilation = benchmarkCompilation
89
89
this .outputDirectory = file(" $benchmarkBuildDir /classes" )
90
90
// A link task's name is linkReleaseExecutable<Target>.
91
- linkTask.apply {
92
- group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
93
- description = " Compile Native benchmark source files for '${compilationTarget.name} '"
94
- dependsOn(generateSourceTaskName(target))
91
+ linkTaskProvider.configure {
92
+ it.apply {
93
+ group = BenchmarksPlugin .BENCHMARKS_TASK_GROUP
94
+ description = " Compile Native benchmark source files for '${compilationTarget.name} '"
95
+ dependsOn(generateSourceTaskName(target))
96
+ }
95
97
}
96
- tasks.getByName(BenchmarksPlugin .ASSEMBLE_BENCHMARKS_TASKNAME ).dependsOn(linkTask )
98
+ tasks.getByName(BenchmarksPlugin .ASSEMBLE_BENCHMARKS_TASKNAME ).dependsOn(linkTaskProvider )
97
99
entryPoint(" kotlinx.benchmark.generated.main" )
98
100
}
99
101
}
@@ -117,11 +119,11 @@ fun Project.createNativeBenchmarkExecTask(
117
119
118
120
val binary =
119
121
benchmarkCompilation.target.binaries.getExecutable(benchmarkCompilation.name, target.buildType)
120
- val linkTask = binary.linkTask
122
+ val linkTask = binary.linkTaskProvider
121
123
122
124
dependsOn(linkTask)
123
125
124
- val executableFile = linkTask.outputFile.get()
126
+ val executableFile = linkTask.get(). outputFile.get()
125
127
onlyIf { executableFile.exists() }
126
128
127
129
this .executable = executableFile
0 commit comments