Manually install Gradle plugin

Viewed 5161

For reasons out of my control I'm unable to resolve plugins from the internet. I want to know how can I manually install the plugins I need so gradle finds them.

I found the .gradle folder and I assume they'll be downloaded there, but have no idea where I should put them.

Any help is more than welcomed.

2 Answers

As mentioned in How to make Gradle repository point to local directory, we can use

repositories {
   flatDir {
       dirs 'D:/path/to/local/directory'
   }
}

or

repositories {
   maven {
       url 'file://D:/path/to/local/directory'
   }
}

and put all *.jar and *.pom files into this directory.

If you write not absolute path, it will be resolved relatively folder with this gradle file.

Also there is a note: flatDir repository doesn't support transitive dependency resolution, while maven local repository does.

Related