tags:

views:

35

answers:

0

Using Gradle 0.8, I have the following file structure

source/
  stuff/
    file.txt
  empty/

Which I want copied to create

target/
  stuff/
    file.txt
  empty/

So I tried this:

  def sourceTree = fileTree(dir: 'source')
  def targetDir = file(dir: 'target')

  copy {
    from sourceTree 
    into targetDir
  }

But instead I end up with:

target/
  stuff/
    file.txt

How do I force inclusion of empty directories?