-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
181 lines (156 loc) · 5 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
171
172
173
174
175
176
177
178
179
180
181
plugins {
id 'java-library'
id 'ru.vyarus.quality' version '4.1.0'
id 'jacoco'
id 'com.github.dawnwords.jacoco.badge' version '0.2.0'
id 'com.adarshr.test-logger' version '2.0.0'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'signing'
}
group = 'com.hedera.hashgraph'
version = '1.0.0'
description = 'Hedera™ DiD SDK'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
nexusPublishing {
repositories {
sonatype()
}
}
dependencies {
// https://mvnrepository.com/artifact/com.hedera.hashgraph/sdk-jdk7
implementation group: 'com.hedera.hashgraph', name: 'sdk-jdk7', version: '2.0.5'
// https://mvnrepository.com/artifact/com.google.gson/gson
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.guava:guava:30.1.1-android'
implementation group: 'org.bitcoinj', name: 'bitcoinj-core', version: '0.15.6'
implementation group: 'io.github.cdimascio', name: 'java-dotenv', version: '5.1.4'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation 'io.grpc:grpc-okhttp:1.35.0'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.0.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.6.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.6.2'
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
apply plugin: 'java'
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
test {
useJUnitPlatform()
systemProperty "file.encoding", "utf-8"
finalizedBy jacocoTestReport
finalizedBy generateJacocoBadge
}
testlogger {
theme 'standard'
showExceptions true
showStackTraces true
showFullStackTraces true
showCauses true
slowThreshold 2000
showSummary true
showSimpleNames false
showPassed true
showSkipped true
showFailed true
showStandardStreams true
showPassedStandardStreams true
showSkippedStandardStreams true
showFailedStandardStreams true
}
quality {
checkstyleVersion = '8.29'
spotbugsVersion = '4.0.1'
checkstyle = true
spotbugs = true
pmd = true
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jacocoTestReport {
group = "Reporting"
description = "Generate Jacoco coverage reports"
reports {
xml.enabled true
html.enabled true
csv.enabled false
}
}
jacocoBadgeGenSetting {
jacocoReportPath "$buildDir/reports/jacoco/test/jacocoTestReport.xml"
readmePath "$projectDir/README.md"
limit = ['instruction': 0, 'branch': 0, 'line': 0, 'method': 0, 'class': 0]
}
javadoc {
source = sourceSets.main.allJava
classpath = sourceSets.main.compileClasspath
options.encoding = 'UTF-8'
destinationDir = file("${projectDir}/docs/sdk-javadocs")
}
shadowJar {
archiveClassifier.set('')
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'did-sdk-java'
description = 'Hedera™ DiD SDK'
url = 'https://github.com/hashgraph/did-sdk-java'
organization {
name = 'Hedera Hashgraph'
url = 'https://www.hedera.com'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/hashgraph/did-sdk-java/issues'
}
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'https://github.com/hashgraph/did-sdk-java/blob/master/LICENSE'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/hashgraph/did-sdk-java'
connection = 'scm:git:https://github.com/hashgraph/did-sdk-java.git'
developerConnection = 'scm:git:ssh://github.com/hashgraph/did-sdk-java.git'
}
developers {
developer {
name = 'Hedera Hashgraph'
}
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}