Merge branch '16212-pam-login'
[arvados.git] / sdk / java-v2 / build.gradle
1 apply plugin: 'java-library'
2 apply plugin: 'eclipse'
3 apply plugin: 'idea'
4 apply plugin: 'maven'
5 apply plugin: 'signing'
6
7
8 repositories {
9     mavenCentral()
10 }
11
12 dependencies {
13     api 'com.squareup.okhttp3:okhttp:3.9.1'
14     api 'com.fasterxml.jackson.core:jackson-databind:2.9.2'
15     api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.2'
16     api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.2'
17     api 'commons-codec:commons-codec:1.11'
18     api 'commons-io:commons-io:2.6'
19     api 'com.google.guava:guava:23.4-jre'
20     api 'org.slf4j:slf4j-api:1.7.25'
21     api 'com.typesafe:config:1.3.2'
22     
23     testImplementation 'junit:junit:4.12'
24     testImplementation 'org.mockito:mockito-core:3.3.3'
25     testImplementation 'org.assertj:assertj-core:3.8.0'
26     testImplementation 'com.squareup.okhttp3:mockwebserver:3.9.1'
27 }
28
29 test {
30     useJUnit {
31         excludeCategories 'org.arvados.client.junit.categories.IntegrationTests'
32     }
33
34         testLogging {
35             events "passed", "skipped", "failed"
36             afterSuite { desc, result ->
37                 if (!desc.parent) { // will match the outermost suite
38                     println "\n---- Test results ----"
39                     println "${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
40                     println ""
41                 }
42             }
43         }
44 }
45
46 task integrationTest(type: Test) {
47     useJUnit {
48         includeCategories 'org.arvados.client.junit.categories.IntegrationTests'
49     }
50 }
51
52 task javadocJar(type: Jar) {
53     classifier = 'javadoc'
54     from javadoc
55 }
56
57 task sourcesJar(type: Jar) {
58     classifier = 'sources'
59     from sourceSets.main.allSource
60 }
61
62 artifacts {
63     archives javadocJar, sourcesJar
64 }
65
66 signing {
67     sign configurations.archives
68 }
69
70 uploadArchives {
71   repositories {
72     mavenDeployer {
73       beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
74
75       repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
76         authentication(userName: ossrhUsername, password: ossrhPassword)
77       }
78
79       snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
80         authentication(userName: ossrhUsername, password: ossrhPassword)
81       }
82
83       pom.project {
84         name 'Arvados Java SDK'
85         packaging 'jar'
86         groupId 'org.arvados'
87         description 'Arvados Java SDK'
88         url 'https://github.com/arvados/arvados'
89                
90        scm {
91          url 'scm:git@https://github.com/arvados/arvados.git'
92          connection 'scm:git@https://github.com/arvados/arvados.git'
93          developerConnection 'scm:git@https://github.com/arvados/arvados.git'
94        }
95
96         licenses {
97           license {
98             name 'The Apache License, Version 2.0'
99             url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
100           }
101         }
102
103         developers {
104           developer {
105             id 'veritasgenetics'
106             name 'Veritas Genetics'
107             email 'ops@veritasgenetics.com'
108           }
109         }
110       }
111     }
112   }
113 }