Skip to content

Commit cbeb279

Browse files
authored
Workaround for expanded lock on Windows (#189)
Picked the workaround from kotlinx-datetime
1 parent bba9aea commit cbeb279

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

benchmarks/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.konan.target.KonanTarget
1010
plugins {
1111
kotlin("multiplatform")
1212
alias(libs.plugins.kotlinx.benchmark.plugin)
13+
id("kotlinx-io-clean")
1314
}
1415

1516
kotlin {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
3+
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
4+
*/
5+
6+
plugins {
7+
base
8+
}
9+
10+
tasks.clean {
11+
// Workaround for https://youtrack.jetbrains.com/issue/KT-58303:
12+
// the `clean` task can't delete the expanded.lock file on Windows as it's still held by Gradle, failing the build
13+
setDelete(layout.buildDirectory.asFileTree.matching {
14+
exclude("tmp/.cache/expanded/expanded.lock")
15+
})
16+
}
17+

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-multiplatform.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
44
*/
55

6-
import org.gradle.kotlin.dsl.kotlin
76
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
87
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
98
import kotlin.jvm.optionals.getOrNull
109

1110
plugins {
1211
kotlin("multiplatform")
12+
id("kotlinx-io-clean")
1313
}
1414

1515
kotlin {

0 commit comments

Comments
 (0)