Skip to content

Commit c952e0b

Browse files
fixed deployToProcessingSketchbook (#75)
* fixed copy bug code wasn't correctly copying files. * removed duplicateStrategy * add back in print of sketchbook location --------- Co-authored-by: Claudine <claudine.chen@gmail.com>
1 parent 69a011a commit c952e0b

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

build.gradle.kts

+19-10
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,24 @@ tasks.register("deployToProcessingSketchbook") {
259259
doFirst {
260260
println("Copy to sketchbook $sketchbookLocation ...")
261261
}
262-
val installDirectory = "$sketchbookLocation/libraries/$libName"
263-
copy {
264-
from(releaseDirectory)
265-
include("library.properties",
266-
"examples/**",
267-
"library/**",
268-
"reference/**",
269-
"src/**"
270-
)
271-
into(installDirectory)
262+
263+
doLast {
264+
val installDirectory = file("$sketchbookLocation/libraries/$libName")
265+
266+
println("Removing old install from: $installDirectory")
267+
delete(installDirectory)
268+
269+
println("Copying fresh build to sketchbook $sketchbookLocation ...")
270+
copy {
271+
from(releaseDirectory)
272+
include(
273+
"library.properties",
274+
"examples/**",
275+
"library/**",
276+
"reference/**",
277+
"src/**"
278+
)
279+
into(installDirectory)
280+
}
272281
}
273282
}

0 commit comments

Comments
 (0)