X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16f704326f44fd1e5e5e60b936c9b5895d6a6ff8..1a18f825a86563252e242d479791821941b8cee8:/sdk/java-v2/build.gradle diff --git a/sdk/java-v2/build.gradle b/sdk/java-v2/build.gradle index eeec33369b..5b09db948a 100644 --- a/sdk/java-v2/build.gradle +++ b/sdk/java-v2/build.gradle @@ -2,8 +2,8 @@ apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'maven' +apply plugin: 'signing' -version = '2.0.0' repositories { mavenCentral() @@ -21,7 +21,7 @@ dependencies { api 'com.typesafe:config:1.3.2' testImplementation 'junit:junit:4.12' - testImplementation 'org.mockito:mockito-core:2.12.0' + testImplementation 'org.mockito:mockito-core:3.3.3' testImplementation 'org.assertj:assertj-core:3.8.0' testImplementation 'com.squareup.okhttp3:mockwebserver:3.9.1' } @@ -48,3 +48,66 @@ task integrationTest(type: Test) { includeCategories 'org.arvados.client.junit.categories.IntegrationTests' } } + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + pom.project { + name 'Arvados Java SDK' + packaging 'jar' + groupId 'org.arvados' + description 'Arvados Java SDK' + url 'https://github.com/arvados/arvados' + + scm { + url 'scm:git@https://github.com/arvados/arvados.git' + connection 'scm:git@https://github.com/arvados/arvados.git' + developerConnection 'scm:git@https://github.com/arvados/arvados.git' + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'veritasgenetics' + name 'Veritas Genetics' + email 'ops@veritasgenetics.com' + } + } + } + } + } +}