Skip to content

Commit 4c81038

Browse files
Abduqodiri Qurbonzodaqurbonzoda
authored andcommitted
Don't use Path.invariantSeparatorsPath in plugin #67
Gradle 7.2 and newer bundle a version of Kotlin where the experimental Path.invariantSeparatorsPath is deprecated and made @InlineOnly. Thus the invocation from the plugin resolves to a private method, leading to error.
1 parent 78186ae commit 4c81038

File tree

1 file changed

+1
-4
lines changed
  • plugin/main/src/kotlinx/benchmark/gradle

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import java.io.File
1010
import java.nio.file.Path
1111
import java.time.LocalDateTime
1212
import java.time.format.DateTimeFormatter
13-
import kotlin.io.path.ExperimentalPathApi
14-
import kotlin.io.path.invariantSeparatorsPath
1513

1614
fun cleanup(file: File) {
1715
if (file.exists()) {
@@ -93,8 +91,7 @@ fun Task.traceFormat(): String {
9391
return if (ideaActive) "xml" else "text"
9492
}
9593

96-
@OptIn(ExperimentalPathApi::class)
97-
val Path.absolutePath: String get() = toAbsolutePath().invariantSeparatorsPath
94+
val Path.absolutePath: String get() = toAbsolutePath().toFile().invariantSeparatorsPath
9895

9996
fun writeParameters(
10097
name: String,

0 commit comments

Comments
 (0)