Description
Describe the bug
When I change something in the example template, lets say add parent.println("version 1") to the Grid class, and run the task deployToProcessingSketchbook, then the jar files inside build/libs and release/myLibrary/library are changed correctly. But somehow the jar file inside my Processing Libraries folder isnt.
I went back and forth with chatGPT (as I am a total newbie at using the gradle approach), finally I've found something that worked. I needed to change the task to this inside build.gradle.kts:
tasks.register("deployToProcessingSketchbook") {
group = "processing"
dependsOn("buildReleaseArtifacts")
doLast {
val installDirectory = file("$sketchbookLocation/libraries/$libName")
println("Removing old install from: $installDirectory")
delete(installDirectory)
println("Copying fresh build to sketchbook...")
project.copy {
from(releaseDirectory) {
include(
"library.properties",
"examples/**",
"library/**",
"reference/**",
"src/**"
)
}
into(installDirectory)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
println("✅ Deployment complete.")
}
}
Am I getting this problem due to a user error (me :) ) ? Or have I indeed found a bug?
I've tested this thouroughly by renaming all the jar files to zip, and use https://www.decompiler.com/ to upload Grid.class and check its contents...
Steps to reproduce
- add
parent.println("version 1");
to Grid.java insidepublic Grid(PApplet theParent, int[] palette) {
- run the task deployToProcessingSketchbook
Expected behavior
I should only be running the task once instead of twice.
Actual behavior
I need to run it twice