From 78654bf545ba5e92cfc5158a93fc7cdd851fd7a1 Mon Sep 17 00:00:00 2001 From: ThatGamerBlue Date: Fri, 2 Aug 2019 11:05:46 +0100 Subject: [PATCH] gradle: add upload task (#1220) --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index f34bc39cab..ab267f2985 100644 --- a/build.gradle +++ b/build.gradle @@ -52,6 +52,7 @@ allprojects { subprojects { apply plugin: 'java-library' + apply plugin: 'maven' sourceCompatibility = 1.8 targetCompatibility = 1.8 tasks.withType(JavaCompile) { @@ -66,6 +67,9 @@ subprojects { maven { url "http://repo.runelite.net" } maven { url "http://repo.maven.apache.org/maven2" } maven { url "https://raw.githubusercontent.com/runelite-extended/maven-repo/master" } + if (System.getenv("NEXUS-URL") != null) { + maven { url System.getenv("NEXUS-URL") } + } } checkstyle { @@ -77,6 +81,16 @@ subprojects { ignoreFailures = false maxWarnings = 0 } + + uploadArchives { + repositories { + mavenDeployer { + repository(url: System.getenv("NEXUS-URL")) { + authentication(userName: System.getenv("NEXUS-USER"), password: System.getenv("NEXUS-PASSWORD")) + } + } + } + } } wrapper {