From af623946512c0cc54f2bfcd4f39d0672371f91f9 Mon Sep 17 00:00:00 2001 From: Speiger Date: Mon, 27 Dec 2021 20:04:50 +0100 Subject: [PATCH] Testing for secrets to be present --- build.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index a3136a29..fd016cca 100644 --- a/build.gradle +++ b/build.gradle @@ -87,8 +87,11 @@ test { } uploadArchives { - Properties props = new Properties() - props.load(new FileInputStream("$buildDir/credentials.properties")) + Properties props = new Properties() + if(file("$buildDir/credentials.properties").exists()) + { + props.load(new FileInputStream("$buildDir/credentials.properties")) + } repositories.mavenDeployer { repository(url: 'https://maven.speiger.com/repository/main') { authentication(userName: props.mavenUser, password: props.mavenPassword)