From c63dc5cd477d1060d46b78837dc285634d0c6e77 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 5 May 2024 13:04:16 +0300 Subject: [PATCH] Update publishing details to be more generic --- build.gradle | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 1b710b8..8d21df5 100644 --- a/build.gradle +++ b/build.gradle @@ -6,10 +6,6 @@ plugins { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 -if(rootProject.file('private.gradle').exists()) { //Publishing details - apply from: 'private.gradle' -} - archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -55,16 +51,15 @@ publishing { // select the repositories you want to publish to repositories { - if (project.hasProperty("artifactoryUsername")) { + def env = System.getenv() + if (env.MAVEN_URL) { maven { - url = "https://server.bbkr.space/artifactory/libs-release/" + url = env.MAVEN_URL credentials { - username = artifactoryUsername - password = artifactoryPassword + username = env.MAVEN_USERNAME + password = env.MAVEN_PASSWORD } } - } else { - println "Cannot configure artifactory; please define ext.artifactoryUsername and ext.artifactoryPassword before running publish" } } }