-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
158 lines (138 loc) · 4.35 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
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()
}
dependencies {
implementation group: 'org.bitcoinj', name: 'bitcoinj-core', version: '0.15.8'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
implementation 'com.google.guava:guava:30.1.1-jre'
testCompileOnly 'org.slf4j:slf4j-api:1.7.32'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.32'
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testCompileOnly 'org.junit.jupiter:junit-jupiter-params:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.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()
}
}
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'
wrapper {
gradleVersion = '7.2'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
groupId = project.group
version = project.version
artifactId = 'crypto'
name = 'java-crypto'
description = 'A Simple Cryptography Implementation in Java for the ARK CORE Blockchain Framework.'
url = 'https://sdk.ark.dev/java/crypto'
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-crypto.git'
developerConnection = 'scm:git:ssh://github.com:ArkEcosystem/java-crypto.git'
url = 'https://github.com/ArkEcosystem/java-crypto'
}
}
}
}
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
}