Gradle - Move a folder from ABC to XYZ

Viewed 31930

Directory Structure:

Project1/ABC/file1.txt

I want the above ABC folder moved/renamed to XYZ (without leaving ABC there).

How can I do this using Gradle. Seems like in Gradle: For a right hand person, it's itching your right ear using your left hand, taking it across top of your head.

I have used the following example: but it doesn't do anything:

task renABCToXYZ(type: Copy) << {
   copy {
      from "Project1"
      into "Project1"
      include 'ABC'
      rename ('ABC', 'XYZ')
   }
}
3 Answers
Related