Skip to content

Commit 85ab32c

Browse files
committed
Switch to using Sync instead of Copy when assembling the scripts
Sync is slightly better because it effectively resets the output directory before copying. That way, old files that shouldn't be included anymore are not included (and avoids having to run ./gradlew clean).
1 parent ee3f228 commit 85ab32c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ val copyThirdPartyComponents by tasks.registering(Sync::class) {
8787
exclude("build-scan-summary-$buildScanSummaryVersion.jar")
8888
}
8989

90-
val unpackArgbash by tasks.registering(Copy::class) {
90+
val unpackArgbash by tasks.registering(Sync::class) {
9191
group = "argbash"
9292
description = "Unpacks Argbash."
9393
from(zipTree(argbash.singleFile)) {
@@ -117,7 +117,7 @@ val generateBashCliParsers by tasks.registering(ApplyArgbash::class) {
117117
})
118118
}
119119

120-
val copyGradleScripts by tasks.registering(Copy::class) {
120+
val copyGradleScripts by tasks.registering(Sync::class) {
121121
group = "build"
122122
description = "Copies the Gradle source and the generated scripts to the output directory."
123123

@@ -169,7 +169,7 @@ val copyGradleScripts by tasks.registering(Copy::class) {
169169
into(layout.buildDirectory.dir("scripts/gradle"))
170170
}
171171

172-
val copyMavenScripts by tasks.registering(Copy::class) {
172+
val copyMavenScripts by tasks.registering(Sync::class) {
173173
group = "build"
174174
description = "Copies the Maven source and the generated scripts to the output directory."
175175

0 commit comments

Comments
 (0)