mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Apply plugin repository credentials for dependency graph plugin
This commit is contained in:
@@ -4,13 +4,29 @@ buildscript {
|
||||
return System.getProperty(name) ?: System.getenv(envVarName)
|
||||
}
|
||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url') ?: 'https://plugins.gradle.org/m2'
|
||||
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
||||
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
||||
def dependencyGraphPluginVersion = getInputParam('dependency-graph-plugin.version') ?: '1.2.2'
|
||||
|
||||
logger.lifecycle("Resolving dependency graph plugin ${dependencyGraphPluginVersion} from plugin repository: ${pluginRepositoryUrl}")
|
||||
repositories {
|
||||
maven { url pluginRepositoryUrl }
|
||||
maven {
|
||||
url pluginRepositoryUrl
|
||||
if (pluginRepositoryUsername && pluginRepositoryPassword) {
|
||||
logger.lifecycle("Applying credentials for plugin repository: ${pluginRepositoryUrl}")
|
||||
credentials {
|
||||
username(pluginRepositoryUsername)
|
||||
password(pluginRepositoryPassword)
|
||||
}
|
||||
authentication {
|
||||
basic(BasicAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.gradle:github-dependency-graph-gradle-plugin:${dependencyGraphPluginVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: org.gradle.github.GitHubDependencyGraphPlugin
|
||||
|
||||
Reference in New Issue
Block a user