My project contains a couple of tar.gz files that I need to extract to the root directory of the project.
I made this as a test:
task untar (type: Copy) {
from tarTree(resources.gzip('model.tar.gz'))
into getProjectDir()
}
When I run it, it's throwing this exception: org.gradle.api.UncheckedIOException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file.
I'm using Gradle 1.1 in Windows 7.
Thanks for the help.
I was able to extract it using this:
task test {
doLast {
copy {
from tarTree(resources.gzip('model.tar.gz'))
into getProjectDir()
}
}
}
My only guess is that either the dir or the tgz file or both are locked during the configuration phase and it's released during the execution phase.
If someone has a solution using the copy task and not the copy method I would appreciate it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With