-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbuild.gradle
173 lines (147 loc) · 5.26 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
*
* This file is part of the bittrex4j project.
*
* @author CCob
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "gradle.plugin.synapticloop:documentr:2.9.0"
classpath 'net.researchgate:gradle-release:2.6.0'
}
}
plugins {
id 'idea'
id 'java-library'
id 'maven'
id 'jacoco'
id 'signing'
id 'synapticloop.documentr' version '2.9.0'
id 'net.researchgate.release' version '2.6.0'
id 'maven-publish'
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
group = 'com.github.ccob'
archivesBaseName = "bittrex4j"
description = "Java library for accessing the Bittrex Web API's and Web Sockets. It currently uses a mix of v1.1 and the undocumented v2 API. "
jar {
manifest {
attributes 'Implementation-Title': 'bittrex4j',
'Implementation-Version': version
}
}
documentr {
verbose = 'false'
documentrFile = 'documentr.json' // perhaps you want to use a different JSON file?
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots"}
maven { url "https://oss.sonatype.org/service/local/repositories/releases/content/"}
}
dependencies {
compile "com.fasterxml.jackson.core:jackson-core:2.9.4"
compile "com.fasterxml.jackson.core:jackson-annotations:2.9.4"
compile "com.fasterxml.jackson.core:jackson-databind:2.9.4"
compile "org.slf4j:slf4j-api:1.7.25"
compile "org.apache.httpcomponents:httpclient:4.5"
compile "com.google.code.gson:gson:2.8.2"
compile 'com.google.code.findbugs:jsr305:3.0.0'
compile 'com.github.signalr4j:signalr4j:2.0.4'
testCompile 'ch.qos.logback:logback-classic:1.2.3'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile 'junit:junit:4.12'
testCompile 'pl.pojo:pojo-tester:0.7.6'
testCompile 'org.reflections:reflections:0.9.10'
testCompile 'ch.qos.logback:logback-classic:1.2.3'
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
//create a single Jar with all dependencies
task fatJar(type: Jar) {
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
artifacts {
archives javadocJar, sourcesJar
}
if(project.findProperty("ossrhUsername") != null && project.findProperty("ossrhPassword") != null) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: project.findProperty("ossrhUsername"), password: project.findProperty("ossrhPassword"))
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: project.findProperty("ossrhUsername"), password: project.findProperty("ossrhPassword"))
}
pom.project {
name 'Bittrex4j'
packaging 'jar'
description 'A java library for accessing the Bittrex Exchange Web API and Web Sockets.'
url 'https://github.com/CCob/bittrex4j'
scm {
connection 'scm:git:https://github.com/CCob/bittrex4j.git'
developerConnection 'scm:git:https://github.com/CCob/bittrex4j.git'
url 'https://github.com/CCob/bittrex4j'
}
licenses {
license {
name 'GNU Lesser General Public License, Version 3.0'
url 'https://www.gnu.org/licenses/lgpl-3.0-standalone.html'
}
}
developers {
developer {
id 'CCob'
name 'Ceri Coburn'
email '[email protected]'
}
}
}
}
}
}
signing {
sign configurations.archives
}
release {
failOnCommitNeeded = true
failOnPublishNeeded = true
failOnSnapshotDependencies = true
failOnUnversionedFiles = true
failOnUpdateNeeded = true
revertOnFail = true
preCommitText = ''
preTagCommitMessage = '[Gradle Release Plugin] - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin] - creating tag : '
newVersionCommitMessage = '[Gradle Release Plugin] - new version commit: '
tagTemplate = '${version}'
// May decide to add additional custom tasks here
buildTasks = ['uploadArchives']
scmAdapters = [
net.researchgate.release.GitAdapter
]
}
}