Clones a GRADLE_USER_HOME into a local maven repo.
Start by running your original build:
GRADLE_USER_HOME=.guh ./gradlew :subproject:dependencies --configuration confName
Then, clone the cache dir into a local maven repo using this project:
./gradlew :run --args="PATH_TO_GUH_FROM_ABOVE"
The output is placed in the repo directory in the root of this repository.
Finally, replace the repository in your original build with a file URL:
repositories {
maven {
url = uri(file("PATH_TO_THIS_REPO/repo"))
}
}
Verify your build now works --offline
./gradlew :subproject:dependencies --configuration confName --offline