From 2eb8999b2fb1f3b7a0a9c2d1b12e4f9a2187bdbe Mon Sep 17 00:00:00 2001 From: dhyces <10985914+dhyces@users.noreply.github.com> Date: Fri, 24 May 2024 15:42:57 -0700 Subject: [PATCH] Update shared.conventions.gradle.kts --- .../src/main/kotlin/shared.conventions.gradle.kts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/buildSrc/src/main/kotlin/shared.conventions.gradle.kts b/buildSrc/src/main/kotlin/shared.conventions.gradle.kts index 086761db..10462885 100644 --- a/buildSrc/src/main/kotlin/shared.conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/shared.conventions.gradle.kts @@ -86,12 +86,14 @@ publishing { name = "Local" url = uri("file://" + findProperty("local_maven")) } - maven { - name = "Maven" - url = findProperty("mavenUrl")?.let { uri(it) }!! - credentials(PasswordCredentials::class) { - username = findProperty("mavenUsername")?.toString() - password = findProperty("mavenPassword")?.toString() + if (hasProperty("mavenUrl")) { + maven { + name = "Maven" + url = findProperty("mavenUrl")?.let { uri(it) }!! + credentials(PasswordCredentials::class) { + username = findProperty("mavenUsername")?.toString() + password = findProperty("mavenPassword")?.toString() + } } } maven {