Skip to content

Commit

Permalink
Use working build.gradle from release branch
Browse files Browse the repository at this point in the history
Fixes #1046
  • Loading branch information
balamurugana committed Sep 7, 2020
1 parent 3e5ba0c commit c0544d1
Showing 1 changed file with 59 additions and 56 deletions.
115 changes: 59 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@
plugins {
id "com.github.johnrengelman.shadow" version "5.2.0"
id "com.github.spotbugs" version "4.0.1"
id "io.codearte.nexus-staging" version "0.21.2"
id "io.codearte.nexus-staging" version "0.22.0"
id "de.marcphilipp.nexus-publish" version "0.4.0"
id "com.diffplug.gradle.spotless" version "4.4.0"
}

/*
* Root project definitions
*/
apply plugin: 'io.codearte.nexus-staging'
apply plugin: "de.marcphilipp.nexus-publish"

allprojects {
group = 'io.minio'
version = '7.1.1'
version = '7.1.3'
if (!project.hasProperty('release')) {
version += '-DEV'
}
Expand All @@ -44,6 +46,7 @@ subprojects {
apply plugin: "com.diffplug.gradle.spotless"

repositories {
mavenLocal()
mavenCentral()
}

Expand Down Expand Up @@ -93,7 +96,7 @@ subprojects {

check.dependsOn localeTest

sourceCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_1_8

spotless {
java {
Expand All @@ -109,17 +112,15 @@ subprojects {
}

project(':api') {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "de.marcphilipp.nexus-publish"

archivesBaseName = 'minio'

nexusStaging {
packageGroup = group
stagingProfileId = '9b746c9f8abc1'
}

configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-annotations:2.9.6'
Expand Down Expand Up @@ -162,65 +163,67 @@ project(':api') {
}
}

artifacts {
archives javadocJar, sourcesJar, shadowJar
}

signing {
if (project.properties.containsKey('signing.keyId')) {
sign configurations.archives
}
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}

ext.nexusUsername = project.properties['nexusUsername']
ext.nexusPassword = project.properties['nexusPassword']

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ext.nexusUsername, password: ext.nexusPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ext.nexusUsername, password: ext.nexusPassword)
}

pom.project {
name 'minio'
packaging 'jar'
description 'MinIO Java SDK for Amazon S3 Compatible Cloud Storage'
url 'https://github.com/minio/minio-java'
inceptionYear '2015'
publishing {
publications {
mavenJava(MavenPublication) {
artifactId archivesBaseName
from components.java
artifact sourcesJar
artifact shadowJar
artifact javadocJar
pom {
name = 'minio'
packaging = 'jar'
description = 'MinIO Java SDK for Amazon S3 Compatible Cloud Storage'
url = 'https://github.com/minio/minio-java'
inceptionYear = '2015'

scm {
connection 'scm:git:git@github.com:minio/minio-java.git'
developerConnection 'scm:git:git@github.com:minio/minio-java.git'
url 'http://github.com/minio/minio-java'
connection = 'scm:git:git@github.com:minio/minio-java.git'
developerConnection = 'scm:git:git@github.com:minio/minio-java.git'
url = 'http://github.com/minio/minio-java'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'minio'
name 'MinIO Inc.'
email 'dev@min.io'
id = 'minio'
name = 'MinIO Inc.'
email = 'dev@min.io'
}
}
}
}
}
}

signing {
if (project.properties.containsKey('signing.keyId')) {
sign publishing.publications.mavenJava
}
}

nexusStaging {
packageGroup = group
stagingProfileId = '9b746c9f8abc1'
username = project.properties['nexusUsername']
password = project.properties['nexusPassword']
}

nexusPublishing {
repositories {
sonatype {
username = project.properties['nexusUsername']
password = project.properties['nexusPassword']
}
}
}
}

project(':examples') {
Expand All @@ -231,10 +234,10 @@ project(':examples') {

sourceSets {
main {
java {
srcDirs = ["$rootDir/examples"]
}
}
java {
srcDirs = ["$rootDir/examples"]
}
}
}
}

Expand Down Expand Up @@ -281,6 +284,6 @@ project(':functional') {
jvmArgs "-Xms256m"
if (rootProject.hasProperty('endpoint') || OperatingSystem.current().isWindows()) {
args = [ext.endpoint, ext.accessKey, ext.secretKey, ext.region]
}
}
}
}

0 comments on commit c0544d1

Please sign in to comment.