-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
188 lines (162 loc) · 5.32 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
182
183
184
185
186
187
188
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.diffplug.spotless' version '5.6.1'
}
group = 'org.arkecosystem'
version = '2.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
sourceSets {
integration {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integrationImplementation.extendsFrom implementation
integrationRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.8.1'
implementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.9.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
integrationImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
integrationImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
integrationImplementation 'org.hamcrest:hamcrest-library:2.2'
integrationImplementation 'org.arkecosystem:crypto:2.0.0'
integrationCompileOnly 'org.slf4j:slf4j-api:1.7.32'
integrationRuntimeOnly 'org.slf4j:slf4j-simple:1.7.32'
integrationImplementation 'com.github.rholder:guava-retrying:2.0.0'
integrationImplementation "cash.z.ecc.android:kotlin-bip39:1.0.2"
}
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
spotless {
java {
target fileTree(projectDir) {
include 'src/main/**/*.java'
include 'src/test/**/*.java'
exclude '**/build/**'
}
googleJavaFormat('1.1').aosp()
removeUnusedImports()
}
}
task formatCode(dependsOn: ['spotlessApply'])
task fatJar(type: Jar) {
manifest.from jar.manifest
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
build.dependsOn 'spotlessApply'
tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
shouldRunAfter test
useJUnitPlatform()
}
wrapper {
gradleVersion = '7.2'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
groupId = project.group
version = project.version
artifactId = 'client'
name = 'java-client'
description = 'A Simple REST API Client Implementation in Java for the ARK CORE Blockchain Framework.'
url = 'https://sdk.ark.dev/java/client'
inceptionYear = '2018'
licenses {
license {
name = 'MIT'
distribution = 'repo'
}
}
developers {
developer {
name = 'Kovač Žan'
email = '[email protected]'
organization = 'ARK Ecosystem'
organizationUrl = 'https://ark.io'
}
developer {
name = 'Kristjan Košič'
email = '[email protected]'
organization = 'ARK Ecosystem'
organizationUrl = 'https://ark.io'
}
developer {
name = 'Brian Faust'
email = '[email protected]'
organization = 'ARK Ecosystem'
organizationUrl = 'https://ark.io'
}
developer {
name = 'Joshua Noack'
email = '[email protected]'
organization = 'ARK Ecosystem'
organizationUrl = 'https://ark.io'
}
}
scm {
connection = 'scm:git:git://github.com/ArkEcosystem/java-client.git'
developerConnection = 'scm:git:ssh://github.com:ArkEcosystem/java-client.git'
url = 'https://github.com/ArkEcosystem/java-client'
}
}
}
}
repositories {
mavenLocal()
maven {
name = "OSSRH"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey as String, signingPassword as String)
sign publishing.publications.mavenJava
}