How to create local repository for Gradle plugins

Our servers are blocked from accessing the internet, and we need to create and use a local repository for the 2 plugins shown below.

The plugin repositiory will be on the servers local D: drive.

We need to modify the local build.gradle to use this repository.

This our current build.gradle file:

   plugins {
      // Gradle Properties plugin
      id '' version '1.4.6'

      // Data Hub plugin
      id '' version '4.3.2'

repositories {

if (project.hasProperty("disconnected") && !"FALSE".equalsIgnoreCase(disconnected)) {
       println "using offline repositories"
} else { 
        println"Using online repositories"
        maven { url "" }

We have a working local Maven repo and Gradle repo ( using code above in “repositories” section ), but need assistance with handling these plugins, please.

If I can get this last part to work, I should have a fully offline hub upgrade process, which will be incredibly useful.

Any help much appreciated.

Thank you.

The repositories in build.gradle are only used for project dependenices. The repositories used to resolve plugins can only be specified through the pluginManagement block in settings.gradle. See Using Gradle Plugins.

This post was flagged by the community and is temporarily hidden.