From d342eefa27120bca5b22a58ba43f04e0f00f5e73 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 1 Oct 2024 17:19:52 -0700 Subject: [PATCH] Use Sync task rather than Copy See gh-42333 --- .../spring-boot-tools/spring-boot-antlib/build.gradle | 6 +++--- .../spring-boot-smoke-test-ant/build.gradle | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-antlib/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-antlib/build.gradle index 83dd9f4d49f..6de24ffc04c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-antlib/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-antlib/build.gradle @@ -25,9 +25,9 @@ dependencies { implementation("org.springframework:spring-core") } -task copyIntegrationTestSources(type: Copy) { +task syncIntegrationTestSources(type: Sync) { + destinationDir file("${buildDir}/it") from file("src/it") - into "${buildDir}/it" filter(springRepoistoryTransformers.ant()) } @@ -39,7 +39,7 @@ processResources { } task integrationTest { - dependsOn copyIntegrationTestSources, jar + dependsOn syncIntegrationTestSources, jar def resultsDir = file("${buildDir}/test-results/integrationTest") inputs.dir(file("src/it")).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("source") inputs.files(sourceSets.main.runtimeClasspath).withNormalizer(ClasspathNormalizer).withPropertyName("classpath") diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/build.gradle index f8ca6bf98f3..dc11df6ccda 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/build.gradle @@ -46,16 +46,16 @@ task syncTestRepository(type: Sync) { } } -task copyAntSources(type: Copy) { +task syncAntSources(type: Sync) { + destinationDir file("${buildDir}/ant") from project.layout.projectDirectory include "*.xml" - into "${buildDir}/ant" filter(springRepoistoryTransformers.ant()) } task antRun(type: JavaExec) { workingDir "${buildDir}/ant" - dependsOn syncTestRepository, copyAntSources, configurations.antDependencies + dependsOn syncTestRepository, syncAntSources, configurations.antDependencies classpath = configurations.antDependencies; mainClass = "org.apache.tools.ant.launch.Launcher" args = [ "clean", "build" ]