diff --git a/build.gradle.kts b/build.gradle.kts index 6dc52ab4ef..e60a5e0055 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,16 +21,18 @@ allprojects { repositories { mavenLocal() mavenCentral() - maven(url = "https://repo.openrs2.dev/repository/openrs2") { - credentials { - username = findProperty("repoUsername")?.toString() - password = findProperty("repoPassword")?.toString() + if (hasProperty("repoUsername")) { + maven(url = "https://repo.openrs2.dev/repository/openrs2") { + credentials { + username = findProperty("repoUsername")?.toString() + password = findProperty("repoPassword")?.toString() + } } - } - maven(url = "https://repo.openrs2.dev/repository/openrs2-snapshots") { - credentials { - username = findProperty("repoUsername")?.toString() - password = findProperty("repoPassword")?.toString() + maven(url = "https://repo.openrs2.dev/repository/openrs2-snapshots") { + credentials { + username = findProperty("repoUsername")?.toString() + password = findProperty("repoPassword")?.toString() + } } } maven(url = "https://dl.bintray.com/michaelbull/maven")