Skip to content

Commit 94fe7bd

Browse files
committed
Ensure authentication requirements are evaluated correctly.
Methods defined outside Groovy/Gradle DSL cannot be invoked (called) inside Groovy/Gradle DSL.
1 parent 0db8ff3 commit 94fe7bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

buildSrc/src/main/groovy/io/spring/gradle/convention/ArtifactoryPlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ class ArtifactoryPlugin implements Plugin<Project> {
3535
project.plugins.apply('com.jfrog.artifactory')
3636

3737
def artifactoryRepoKey = resolveRepositoryKey(project)
38+
def authRequired = isAuthRequired(project)
39+
3840
project.artifactory {
3941
contextUrl = 'https://repo.spring.io'
4042
publish {
4143
repository {
4244
repoKey = artifactoryRepoKey
43-
if (isAuthRequired(project)) {
45+
if (authRequired) {
4446
username = artifactoryUsername
4547
password = artifactoryPassword
4648
}

0 commit comments

Comments
 (0)