From 69c4189f0b1552dd20f5a91e9c51789e9f406aea Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 22 Jan 2021 12:26:54 -0800 Subject: [PATCH] Set auth credentials when present to autheticate with Spring libs-snapshot Repository. --- build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2e78769..7925d2f 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,15 @@ buildscript { repositories { mavenCentral() gradlePluginPortal() - maven { url 'https://repo.spring.io/plugins-snapshot' } + maven { + url 'https://repo.spring.io/plugins-snapshot' + if (project.hasProperty('artifactoryUsername')) { + credentials { + username "$artifactoryUsername" + password "$artifactoryPassword" + } + } + } } }