From f089d70d5f4a0daa17d86b81d6a75c9919ac2857 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 29 Oct 2023 00:50:55 +0200 Subject: [PATCH] Remove deprecated usage --- buildSrc/src/main/kotlin/twomartens.java.gradle.kts | 2 +- .../src/main/kotlin/twomartens.nebula-release.gradle.kts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/twomartens.java.gradle.kts b/buildSrc/src/main/kotlin/twomartens.java.gradle.kts index 09bed28..f6ffa28 100644 --- a/buildSrc/src/main/kotlin/twomartens.java.gradle.kts +++ b/buildSrc/src/main/kotlin/twomartens.java.gradle.kts @@ -54,7 +54,7 @@ normalization.runtimeClasspath.metaInf { } tasks.register("cleanLibs") { - delete("${buildDir}/libs") + delete("${layout.buildDirectory}/libs") } tasks.build { diff --git a/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts b/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts index 6f5f07d..1f88f49 100644 --- a/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts +++ b/buildSrc/src/main/kotlin/twomartens.nebula-release.gradle.kts @@ -9,10 +9,10 @@ apply(plugin="com.netflix.nebula.release") tasks.register("writeVersionProperties") { group = "version" mustRunAfter("release") - outputs.file("$buildDir/version.properties") - val directory = buildDir + outputs.file("${layout.buildDirectory}/version.properties") + val directory = layout.buildDirectory.asFile doLast { - Files.createDirectories(directory.toPath()) - File("$buildDir/version.properties").writeText("VERSION=${project.version}\n") + Files.createDirectories(directory.get().toPath()) + File("${layout.buildDirectory}/version.properties").writeText("VERSION=${project.version}\n") } } \ No newline at end of file