Skip to content

Commit aaf91cc

Browse files
author
Abduqodiri Qurbonzoda
committed
Fix compiler warning: Accessing task instance directly is deprecated
1 parent 04fbfe0 commit aaf91cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private fun Project.createJsBenchmarkCompileTask(target: JsBenchmarkTarget): Kot
4646
)
4747
}
4848

49-
compileKotlinTask.apply {
49+
compileTaskProvider.get().apply {
5050
group = BenchmarksPlugin.BENCHMARKS_TASK_GROUP
5151
description = "Compile JS benchmark source files for '${target.name}'"
5252

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private fun Project.createNativeBenchmarkCompileTask(target: NativeBenchmarkTarg
6262
// a link task. So we disable execution the klib compiling task to save time.
6363
// benchmarkCompilation.compileKotlinTask.enabled = false
6464

65-
benchmarkCompilation.compileKotlinTask.dependsOn(generateSourceTaskName(target))
65+
benchmarkCompilation.compileTaskProvider.get().dependsOn(generateSourceTaskName(target))
6666

6767
benchmarkCompilation.apply {
6868
val sourceSet = kotlinSourceSets.single()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private fun Project.createWasmBenchmarkCompileTask(target: WasmBenchmarkTarget):
4242
)
4343
}
4444
}
45-
compileKotlinTask.apply {
45+
compileTaskProvider.get().apply {
4646
group = BenchmarksPlugin.BENCHMARKS_TASK_GROUP
4747
description = "Compile Wasm benchmark source files for '${target.name}'"
4848
dependsOn("${target.name}${BenchmarksPlugin.BENCHMARK_GENERATE_SUFFIX}")

0 commit comments

Comments
 (0)