mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-06 16:26:12 +02:00
Plugin repository URL is configurable
The repository URL used to resolve the `github-dependency-graph-gradle-plugin` is now configurable, allowing a user to specify an internal proxy if the public portal is not available. Specify a custom plugin repository using the `GRADLE_PLUGIN_REPOSITORY_URL` env var, or the `gradle.plugin-repository.url` System property. Fixes #933
This commit is contained in:
parent
a71aff6a12
commit
8cbcb9948b
2 changed files with 30 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
|||
buildscript {
|
||||
def getInputParam = { String name ->
|
||||
def envVarName = name.toUpperCase().replace('.', '_').replace('-', '_')
|
||||
return System.getProperty(name) ?: System.getenv(envVarName)
|
||||
}
|
||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url') ?: 'https://plugins.gradle.org/m2'
|
||||
|
||||
repositories {
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
maven { url pluginRepositoryUrl }
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.gradle:github-dependency-graph-gradle-plugin:1.0.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue