mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Allow configuring credentials for custom Gradle plugin repository (#61)
This commit is contained in:
@@ -21,6 +21,8 @@ initscript {
|
||||
}
|
||||
|
||||
def pluginRepositoryUrl = getInputParam('gradle.plugin-repository.url')
|
||||
def pluginRepositoryUsername = getInputParam('gradle.plugin-repository.username')
|
||||
def pluginRepositoryPassword = getInputParam('gradle.plugin-repository.password')
|
||||
def gePluginVersion = getInputParam('develocity.plugin.version')
|
||||
def ccudPluginVersion = getInputParam('develocity.ccud-plugin.version')
|
||||
|
||||
@@ -32,7 +34,19 @@ initscript {
|
||||
logger.lifecycle("Develocity plugins resolution: $pluginRepositoryUrl")
|
||||
|
||||
repositories {
|
||||
maven { url pluginRepositoryUrl }
|
||||
maven {
|
||||
url pluginRepositoryUrl
|
||||
if (pluginRepositoryUsername && pluginRepositoryPassword) {
|
||||
logger.lifecycle("Using credentials for plugin repository")
|
||||
credentials {
|
||||
username(pluginRepositoryUsername)
|
||||
password(pluginRepositoryPassword)
|
||||
}
|
||||
authentication {
|
||||
basic(BasicAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user