Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use working build.gradle from release branch #1054

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 59 additions & 52 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 @@ -166,61 +167,67 @@ project(':api') {
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 +238,10 @@ project(':examples') {

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

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