forked from KillerInk/binance-java-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
98 lines (80 loc) · 2.24 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
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id 'io.codearte.nexus-staging' version '0.30.0'
}
def isRelease = project.findProperty("snapshot") == 'false'
group 'com.mohamnag.binance-client'
version '1.0.0' + (isRelease ? '' : '-SNAPSHOT')
java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
// TODO: 07.05.21 check if we really need this
implementation 'org.apache.commons:commons-lang3:3.6'
testImplementation 'junit:junit:4.+'
}
javadoc {
options.addBooleanOption('html5', true)
failOnError = false
}
nexusStaging {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
publishing {
repositories {
maven {
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
url = isRelease ? releaseRepo : snapshotRepo
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Binance Client'
description = 'Binance Client'
url = 'https://github.com/mohamnag/binance-client-java'
licenses {
license {
name = 'MIT'
url = 'https://github.com/mohamnag/binance-client-java/blob/master/LICENSE'
}
}
developers {
developer {
id = 'mohamnag'
name = 'Mohammad Naghavi'
email = '[email protected]'
}
}
scm { url = '[email protected]:mohamnag/binance-client-java.git' }
}
}
}
}
signing {
String signingKey = findProperty("signingKey")
String signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
tasks.withType(Sign) {
onlyIf { isRelease }
}