From 067094130ff26bdb7c99dddf0e9c60d0bbf0230d Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 10 Apr 2022 00:12:44 -0500 Subject: [PATCH] Lets try this again --- Jenkinsfile | 4 ++-- build.gradle | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 50dcd0d..db6c966 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { } } } - /*stage("publish") { + stage("publish") { when { branch "master" } @@ -19,7 +19,7 @@ pipeline { } } } - }*/ + } } post { always { diff --git a/build.gradle b/build.gradle index 93f13cb..5e0274f 100644 --- a/build.gradle +++ b/build.gradle @@ -28,20 +28,22 @@ allprojects { options.encoding = "UTF-8" } - publishing { - publications { - maven(MavenPublication) { - from(components.java) + afterEvaluate { project -> + publishing { + publications { + maven(MavenPublication) { + from(components.java) + } } - } - repositories { - maven { - def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/") - def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/") - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username = System.getenv("plexUser") - password = System.getenv("plexPassword") + repositories { + maven { + def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/") + def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/") + url = version.endsWith('-SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + credentials { + username = System.getenv("plexUser") + password = System.getenv("plexPassword") + } } } }