How can I use gradle copy inside a custom task


(rajesh.eq) #1

How can I use gradle copy inside a custom task


(rajesh.eq) #2

import org.gradle.api.tasks.Copy

@TaskAction def ab(){ copy{ from “$projectDir/target/1.txt” into “$projectDir/target/dum” } }


(rajesh.eq) #3

Found the answer from previous posts. It’s project.copy { … }.