From 0be7dba5d31ad3812923677a67815b140767e3d7 Mon Sep 17 00:00:00 2001 From: Speiger Date: Fri, 29 Mar 2024 22:26:34 +0100 Subject: [PATCH] Fixed script bug --- build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index e6682380..d5ee3651 100644 --- a/build.gradle +++ b/build.gradle @@ -327,19 +327,19 @@ publishing { repositories { maven { if(isMavenCentral) { - def auth = System.getenv("Maven_Central_Auth").split(';'); + def auth = System.getenv("Maven_Central_Auth")?.split(';'); url version.endsWith('SNAPSHOT') ? "https://s01.oss.sonatype.org/content/repositories/snapshots/" : "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" credentials { - username auth[0] - password auth[1] + username auth?[0] + password auth?[1] } } else { - def auth = System.getenv("Speiger_Maven_Auth").split(';'); + def auth = System.getenv("Speiger_Maven_Auth")?.split(';'); url version.endsWith('SNAPSHOT') ? "https://maven.speiger.com/repository/debug" : "https://maven.speiger.com/repository/main" credentials(PasswordCredentials) { - username auth[0] - password auth[1] + username auth?[0] + password auth?[1] } } }