Skip to content

Instantly share code, notes, and snippets.

@gavvvr
Created July 30, 2021 08:01
Show Gist options
  • Save gavvvr/bcad18597dcc8aba0256726250b642b6 to your computer and use it in GitHub Desktop.
Save gavvvr/bcad18597dcc8aba0256726250b642b6 to your computer and use it in GitHub Desktop.
Forcing Gradle to work only with custom local repository
artifactoryUrl=https://your.repo/artifactory
pluginManagement {
repositories {
maven {
url "${yourArtifactoryUrl}/plugins-release"
}
}
}
dependencyResolutionManagement {
// use this enforcement in case your module tries to use other repos (i.e. Spring Boot project will try to use Maven central)
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
maven {
url "${yourArtifactoryUrl}/libs-release"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment