Ensure authentication requirements are evaluated correctly.
Methods defined outside Groovy/Gradle DSL cannot be invoked (called) inside Groovy/Gradle DSL.
This commit is contained in:
@@ -35,12 +35,14 @@ class ArtifactoryPlugin implements Plugin<Project> {
|
||||
project.plugins.apply('com.jfrog.artifactory')
|
||||
|
||||
def artifactoryRepoKey = resolveRepositoryKey(project)
|
||||
def authRequired = isAuthRequired(project)
|
||||
|
||||
project.artifactory {
|
||||
contextUrl = 'https://repo.spring.io'
|
||||
publish {
|
||||
repository {
|
||||
repoKey = artifactoryRepoKey
|
||||
if (isAuthRequired(project)) {
|
||||
if (authRequired) {
|
||||
username = artifactoryUsername
|
||||
password = artifactoryPassword
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user