From 00274cc4e53d4c2e34a069eca708ce7be9601228 Mon Sep 17 00:00:00 2001 From: Alaric Date: Mon, 16 Jul 2018 15:33:35 +0800 Subject: [PATCH] [RAC-6591] Release both version number and snapshot tagged packages (#11) * correct gradle build script * To automatically close and release smi-lib jar --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5ce26b3..7179954 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +// Copyright © 2018 DELL Inc. or its subsidiaries. All Rights Reserved. + apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'org.sonarqube' @@ -7,6 +9,7 @@ apply plugin: 'com.jfrog.artifactory' apply plugin: 'signing' apply plugin: 'maven' //apply plugin: 'nebula.lint' +apply plugin: 'io.codearte.nexus-staging' sourceCompatibility = 1.8 version = "${version}" @@ -28,6 +31,7 @@ buildscript { classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1" classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1" //classpath 'com.netflix.nebula:gradle-lint-plugin:latest.release' + classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0" } } @@ -55,6 +59,11 @@ javadoc { } } +task snapshotJar(type: Jar){ + baseName = archivesBaseName + version = '1.0-SNAPSHOT' +} + task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allSource @@ -146,7 +155,7 @@ uploadArchives { } artifacts { - archives javadocJar, sourcesJar + archives javadocJar, sourcesJar, snapshotJar } signing {