From fb9cb2a6b16d4446089c2dc1a2342030bfb00c44 Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 29 Aug 2023 12:07:04 +0100 Subject: [PATCH] Replace use of deprecated buildDir property Signed-off-by: Graham --- all/build.gradle.kts | 8 ++++---- build.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/all/build.gradle.kts b/all/build.gradle.kts index db11902a6e..911e761657 100644 --- a/all/build.gradle.kts +++ b/all/build.gradle.kts @@ -39,10 +39,10 @@ tasks.shadowJar { tasks.register("generateAuthors") { inputs.dir("$rootDir/.git") - outputs.file("$buildDir/AUTHORS") + outputs.file(layout.buildDirectory.file("AUTHORS")) doLast { - Files.newOutputStream(buildDir.toPath().resolve("AUTHORS")).use { out -> + Files.newOutputStream(layout.buildDirectory.file("AUTHORS").get().asFile.toPath()).use { out -> exec { commandLine("git", "shortlog", "-esn", "HEAD") standardOutput = out @@ -80,7 +80,7 @@ distributions { distributionBaseName.set("openrs2") contents { - from("$buildDir/AUTHORS") + from(layout.buildDirectory.file("AUTHORS")) from("$rootDir/CONTRIBUTING.md") from("$rootDir/DCO") from("$rootDir/LICENSE") @@ -97,7 +97,7 @@ distributions { exclude(".*", "*~") into("share") } - from("$buildDir/reports/dependency-license/THIRD-PARTY-NOTICES.txt") { + from(layout.buildDirectory.file("reports/dependency-license/THIRD-PARTY-NOTICES.txt")) { rename { "third-party-licenses.txt" } into("share/doc") } diff --git a/build.gradle.kts b/build.gradle.kts index e0ce1aab57..94791a3b01 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -319,7 +319,7 @@ tasks.register("publishDokka") { "ssh -oStrictHostKeyChecking=accept-new", "--delete", "-rtz", - "$buildDir/dokka/htmlCollector/", + "${layout.buildDirectory}/dokka/htmlCollector/", "build@docs.openrs2.org:/srv/www/docs" ) }