After packaging, there will usually be copy jar files.
First define your task in the build.gradle file:
task myCopy{
println “some copy code…”
}
build.finalizedBy(myCopy)
So after the build, myCopy will be executed, or if you want to execute your mycopy after other tasks, just change the red part.