I am new to Gradle and I am obviously missing something. I have 2 tasks in gradle:
task myCopy(type: Copy) {
println 'copy1'
from 'src/main/java/android/app/cfg/TestingConfigCopy.java'
into 'src/main/java/android/app/cfg/temp'
}
task myDelete(dependsOn: 'myCopy', type: Delete) {
println 'delete1'
delete 'src/main/java/android/app/cfg/TestingConfigCopy.java'
}
When I remove dependency and run them 1 by 1, file gets copied and then the old one deleted but when I use dependency and run the myDelete task, the file gets copied but doesnt get deleted. I feel I am missing some basic behaviour of Gradle. Those tasks are located at the end of my build.gradle file inside /app directory of the android project.