I'm fairly new to Gradle. I have a multi-project build that uses some dependencies currently packaged within the project (using repositories and flatDir), as they're not available in an artifactory. I want to remove this local folder and download a couple of archives holding these dependencies, unpack them and proceed with the build as regular. I will use https://plugins.gradle.org/plugin/de.undercouch.download for downloading, but I don't know how to this before any dependency resolution (and ideally, download if not already done). Currently, the build fails in the configuration phase as far as I can tell:
`A problem occurred configuring project ':sub-project-A'.
> Could not resolve all files for configuration ':sub-project-A:compileCopy'.
Could not find :<some-dependency>:.
EDIT: Downloading the files works. Still struggling with unzipping the archives:
task unzipBirt(dependsOn: downloadPackages, type: Copy) {
println 'Unpacking archiveA.zip'
from zipTree("${projectDir}/lib/archiveA.zip")
include "ReportEngine/lib"
into "${projectDir}/new_libs"
}
How do I make this run in the configuration phase ?
See Project.files(Object...) which states
So you can do:
Note: if there's lots of jars in the zip you can do