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 {