From 7ddf30647e9f7a294d79d8d114b3c05d6de595c9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 22 Jan 2021 14:26:02 -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 713f7b6..e63ba8b 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,15 @@ buildscript { mavenCentral() gradlePluginPortal() maven { url 'https://repo.spring.io/release' } - 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" + } + } + } } }