From c3d25b87df5b06a4ec92929a51a6f74d6b441487 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 14 Apr 2021 11:26:44 -0700 Subject: [PATCH] Declare Artifactory credentials if 'artifactoryUsername' proeprty is present. --- build.gradle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.gradle b/build.gradle index cc5dd7a..b6ab1b6 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,22 @@ allprojects { } } +if (project.hasProperty('artifactoryUsername')) { + allprojects { project -> + project.repositories { repos -> + all { repo -> + if (!repo.url.toString().startsWith("https://repo.spring.io/")) { + return; + } + repo.credentials { + username = artifactoryUsername + password = artifactoryPassword + } + } + } + } +} + description = 'Spring Session for Apache Geode' ext['groovy.version'] = "$groovyVersion"