diff --git a/build.gradle b/build.gradle index e668238..d5ee365 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] } } }