From f4dd8bc3b19d1c411a8848311e566e8464482961 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 05a2ea5..6b48192 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" + } + } + } } }