Hi all,

I am trying to figure out how to create a copy task that allows me to
copy a couple files to a couple destinations.
Something that might look like (but doesn't) this:

tasks.add(name: 'build', type: Copy, dependsOn: hello) {
        from 'log.txt'
        from 'freshbuild.sh'
        into "dest1"
        into "dest2"
}

but, unfortunately, this doesn't work.
I can't find in the docs any example of how this is done.
Can it?

And also, basically I was trying to achieve a MOVE here, and so

1. deleting any existing file at the destination before the copy
2. deleting the file from the source after the copy

with the following:


build.doFirst {
        println "in build dofirst, and file exists? : " + new
File('test/log.txt').isFile()
        new File('dest1/log.txt').delete()
        new File('dest1/freshbuild.sh').delete()
                println "in build dofirst, and file exists? : " + new
File('test/log.txt').isFile()
}

build.doLast {
        println "in build doLast, and file exists? : " + new
File('test/log.txt').isFile()
        new File('log.txt').delete()
        new File('freshbuild.sh').delete()
}

so I figure that excludes me from running the copy task multiple times
with different arguments (as the source files would be deleted after
the first copy)


Or am I trying to make something simple very difficult?

sean

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to