From 836f46c3d4ec212b2412708598083e228e0f13b9 Mon Sep 17 00:00:00 2001 From: Noemi Praml Date: Fri, 6 Sep 2024 14:49:15 +0200 Subject: [PATCH] FIX: publishing to mvn --- .../groovy/rhino.library-conventions.gradle | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/buildSrc/src/main/groovy/rhino.library-conventions.gradle b/buildSrc/src/main/groovy/rhino.library-conventions.gradle index 3f98be524..d5e0661f8 100644 --- a/buildSrc/src/main/groovy/rhino.library-conventions.gradle +++ b/buildSrc/src/main/groovy/rhino.library-conventions.gradle @@ -79,3 +79,22 @@ task sourceJar(type: Jar) { into 'META-INF' } } + +publishing { + if (project.hasProperty("mavenPassword")) { + repositories { + + maven { + credentials { + username mavenUser + password mavenPassword + } + if (project.version.endsWith('-SNAPSHOT')) { + url mavenSnapshotRepo + } else { + url mavenReleaseRepo + } + } + } + } +}