From 65e0bd11990ca290851754ddf98028ced99dea44 Mon Sep 17 00:00:00 2001 From: Premysl Vyhnal <44365000+pvyhnal-generalbytes@users.noreply.github.com> Date: Fri, 3 May 2019 15:04:31 +0200 Subject: [PATCH] publish to GB artifactory --- core/build.gradle | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/core/build.gradle b/core/build.gradle index aeb89c28a50..eb69a5222cf 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,12 +1,21 @@ apply plugin: 'java' apply plugin: 'com.google.protobuf' apply plugin: 'maven' +apply plugin: 'maven-publish' apply plugin: 'eclipse' version = '0.15.1.20190418' archivesBaseName = 'litecoinj-core' eclipse.project.name = 'litecoinj-core' +buildscript { + ext.with { + hasGbUploadArtifactory = (project.hasProperty('gbArtifactoryUploadUrl') + && project.hasProperty('gbArtifactoryUser') + && project.hasProperty('gbArtifactoryPassword')) + } +} + dependencies { compile 'org.bouncycastle:bcprov-jdk15on:1.60' implementation 'com.lambdaworks:scrypt:1.4.0' @@ -50,3 +59,23 @@ artifacts { archives sourcesJar archives javadocJar } + +publishing { + if (hasGbUploadArtifactory) { + repositories { + maven { + credentials { + username gbArtifactoryUser + password gbArtifactoryPassword + } + url gbArtifactoryUploadUrl + } + } + } + + publications { + mavenJava(MavenPublication) { + from components.java + } + } +}