1

Given a Gradle project, that has:

  • Runtime/Compile-time dependencies.
  • Source/Javadoc Jars of dependencies.
  • Gradle plugins.

All of which are retrieved from the internet.

How can I download all of these online dependencies to a local folder, and then use them locally in a Gradle project?

The goal is to end up with a project that doesn't rely on an internet connection at all.

Fudge Fudge
  • 1,024
  • 1
  • 10
  • 25
  • Does this answer your question? [How to configure gradle to work "offline" (using cached dependencies)](https://stackoverflow.com/questions/32171524/how-to-configure-gradle-to-work-offline-using-cached-dependencies) – Martin Zeitler Feb 13 '22 at 15:31

1 Answers1

0

You can do a one-time download of your required dependencies to a local folder, and add a local "maven repo", besides the dependencies, it should also work for sources.

repositories {
   maven {
       url 'file://C:/LocalRepo'
   }
}
Kfir Doron
  • 229
  • 2
  • 5