diff --git a/buildSrc/src/main/kotlin/Things.kt b/buildSrc/src/main/kotlin/Things.kt new file mode 100644 index 0000000..9e89b04 --- /dev/null +++ b/buildSrc/src/main/kotlin/Things.kt @@ -0,0 +1,5 @@ +import java.nio.file.Path +import org.gradle.api.file.RegularFile + +val RegularFile.asPath: Path + get() = asFile.toPath() \ No newline at end of file diff --git a/version-catalog/build.gradle.kts b/version-catalog/build.gradle.kts index 6fb7f2e..f323e01 100644 --- a/version-catalog/build.gradle.kts +++ b/version-catalog/build.gradle.kts @@ -1,3 +1,6 @@ +import kotlin.io.path.createDirectories +import kotlin.io.path.writeText + plugins { convention `version-catalog` @@ -10,7 +13,8 @@ val replaceVersion by tasks.registering { inputs.file(input) doLast { output.get() - .asFile + .asPath + .apply { parent.createDirectories() } .writeText( input .readText()