I am working with a third-party multi-module gradle build that relies on having a plugin jar on the filesystem next to the project.
It looks something like this
build.gradle
settings.gradle
third-party/custom/gradle/plugins/theirplugin-1.2.3.jar
|--server1/build.gradle
|--server2/build.gradle
Each of the sub-project has an apply plugin: their-plugin
The build.gradle references it with:
buildscript {
dependencies {
classpath files("third-party/custom/gradle/plugins/theirplugin-1.2.3.jar")
}
}
Everything but the third-party directory is checked in. The contents of the third-party directory are in a zip in Artifactory because it is 1 GB in size (!),
The third-party zip is defined in the main dependencies
block and I have a separate task to extract it to disk using copy from fileTree
.
The problem is that the sub-projects will only resolve the plugin if the third-party zip has already been downloaded and extracted so the build fails before it can download and extract the zip.
Can I do this download and extract before gradle resolves the sub-projects? Perhaps in the settings.gradle
instead?