I am a little bit mistified on the behavior of a file copy. Folder structure exists and works for normal file manipulations in my shell.
I have the following Gradle code not working, despite the fact that I can log those variables out and get the perfect absolute path in the console.
task copyAndRename(type: Copy, dependsOn: assemble){
def sourcedir = workspace + /'relative/source/dir/to/lib'
def destdir = workspace + '/relative/dest/dir/of/lib'
from (sourcedir)
into destdir
}
I tried variations without success, such as
from ('${workspace}/relative/source/dir/to/lib')
into '${workspace}/relative/dest/dir/of/lib'
The only way this is working is when I put the absolute path as a String parameter to from and into, as in /var/tmp or so.
from ('from/root/with/full/source/path')
into 'from/root/with/full/destination/path'
This is clearly not ideal and I am sure there is a way, but what am I missing here?