This is a very strange issue that I have run into. I need to unzip a zip file followed by extracting more contents from a jar file.
Extract main.zip
------->main.jar
Extract main.jar
-------> get a resource
But the issue is - even before the zip file is extracted, it looks for the jar file and the task fails. Isn’t the task supposed to execute sequentially?
I seem to be missing an important piece here. Can someone please explain?
This is how I implemented it -
task extract(type:Copy){
from
zipTree(sourceZip)
into finalDir
from zipTree(sourceJar)
into finalDir
}