Remove calls to deprecated Project.getBuildDir() in Gradle files

Closes gh-42739
This commit is contained in:
Moritz Halbritter
2024-10-17 17:41:00 +02:00
parent a48dfbd5c7
commit ce106eb43c
16 changed files with 64 additions and 63 deletions

View File

@@ -28,29 +28,29 @@ dependencies {
task syncMavenRepository(type: Sync) {
from configurations.app
into "${buildDir}/docker-test-maven-repository"
into layout.buildDirectory.dir("docker-test-maven-repository")
}
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
sourceDirectory = file("spring-boot-loader-tests-app")
destinationDirectory = file("${buildDir}/spring-boot-loader-tests-app")
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-loader-tests-app"))
}
task buildApp(type: GradleBuild) {
dependsOn syncAppSource, syncMavenRepository
dir = "${buildDir}/spring-boot-loader-tests-app"
dir = layout.buildDirectory.dir("spring-boot-loader-tests-app")
startParameter.buildCacheEnabled = false
tasks = ["build"]
}
task syncSignedJarAppSource(type: org.springframework.boot.build.SyncAppSource) {
sourceDirectory = file("spring-boot-loader-tests-signed-jar")
destinationDirectory = file("${buildDir}/spring-boot-loader-tests-signed-jar")
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-loader-tests-signed-jar"))
}
task buildSignedJarApp(type: GradleBuild) {
dependsOn syncSignedJarAppSource, syncMavenRepository
dir = "${buildDir}/spring-boot-loader-tests-signed-jar"
dir = layout.buildDirectory.dir("spring-boot-loader-tests-signed-jar")
startParameter.buildCacheEnabled = false
tasks = ["build"]
}
@@ -69,7 +69,7 @@ task syncJdkDownloads(type: Sync) {
dependsOn downloadJdk
from "${project.gradle.gradleUserHomeDir}/caches/springboot/downloads/jdk/oracle/"
include "jdk-${oracleJdkVersion}_linux-${oracleJdkArch}_bin.tar.gz"
into "${project.buildDir}/downloads/jdk/oracle/"
into layout.buildDirectory.dir("downloads/jdk/oracle/")
}
tasks.named("processDockerTestResources").configure {