-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
105 lines (92 loc) · 3.55 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
group = 'io.voucherify.client'
version = '11.2.2'
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceSets {
main {
java {
exclude 'io/voucherify/example/**'
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
groupId group
artifactId 'voucherify-java-sdk'
version version
from components.java
pom {
name = System.getenv('POM_NAME') ?: POM_NAME
description = System.getenv('POM_DESCRIPTION') ?: POM_DESCRIPTION
url = System.getenv('POM_URL') ?: POM_URL
licenses {
license {
name = System.getenv('POM_LICENCE_NAME') ?: POM_LICENCE_NAME
url = System.getenv('POM_LICENCE_URL') ?: POM_LICENCE_URL
distribution = System.getenv('POM_LICENCE_DIST') ?: POM_LICENCE_DIST
}
}
developers {
developer {
id = System.getenv('POM_DEVELOPER_ID') ?: POM_DEVELOPER_ID
name = System.getenv('POM_DEVELOPER_NAME') ?: POM_DEVELOPER_NAME
}
}
scm {
connection = System.getenv('POM_SCM_CONNECTION') ?: POM_SCM_CONNECTION
developerConnection = System.getenv('POM_SCM_DEV_CONNECTION') ?: POM_SCM_DEV_CONNECTION
url = System.getenv('POM_SCM_URL') ?: POM_SCM_URL
}
}
}
}
repositories {
maven {
def releasesRepoUrl = System.getenv('RELEASE_REPOSITORY_URL') ?: RELEASE_REPOSITORY_URL
def snapshotsRepoUrl = System.getenv('SNAPSHOT_REPOSITORY_URL') ?: SNAPSHOT_REPOSITORY_URL
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv('NEXUS_USERNAME') ?: NEXUS_USERNAME
password = System.getenv('NEXUS_PASSWORD') ?: NEXUS_PASSWORD
}
}
}
}
if (project.hasProperty('sign')) {
signing {
sign publishing.publications.maven
}
}
dependencies {
compile group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.6.1'
compile group: 'com.squareup.retrofit2', name: 'converter-jackson', version: '2.6.1'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.12.0'
compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.2.2'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.0.0'
testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '3.12.0'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.0.1'
}
test {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
}
}