0

I would to like synchronize two folders in my eclipse project with a gradle task.

The source folder is a linked resource. The destination folder a 'real' folder.

I choose the gradle Sync task to do the work, but no file or folder was copied to the traget folder.

The task in the gradle.build file:

task copyA2B(type: Sync) {
    from 'dest'
    into 'target'   
}

Any ideas?

Gradle Version: 4.10.2

Ben
  • 290
  • 2
  • 17
  • *linked resource* : do you mean "linked folder" created from Eclipse? then Gradle cannot see this "virtual" folder , that's why nothing is copied to *target* directory. Gradle is not aware of this Eclipse-specific "linked resource" – M.Ricciuti Oct 08 '18 at 17:28
  • Yes i mean the "linked folder" feature. The "linked folder" is a network share. I have tried the direct access with absolute path like this: `from 'O://src/' into 'C://dest/'`. Then only files in the root place of the folder are synced. – Ben Oct 08 '18 at 17:35
  • Using absolute path should work, I have juste made simple test like that : `task copyA2B(type: Sync) { from 'y://aaa/' into 'c://todelete/' eachFile{ println "Source file : $it" } }` where `y:/` is a network drive pointing on shared folder from another PC: the files are correctly copied by the `Sync` task. – M.Ricciuti Oct 08 '18 at 18:28

0 Answers0