15370: Fix flaky test.
[arvados.git] / sdk / java-v2 / build.gradle
index eeec33369b5df6b0ded4c35a8da7d419beed7bb5..5b09db948aad5fe1f7866b87bdd595cd9d976200 100644 (file)
@@ -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'
+          }
+        }
+      }
+    }
+  }
+}