forked from zksync-sdk/zksync2-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·128 lines (113 loc) · 3.56 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}
group = 'io.zksync'
version = System.getenv('VERSION')
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'zksync2'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'ZkSync2 SDK'
description = 'This repository provides a Java SDK for zkSync developers, which can be used either on PC or Android.'
url = 'https://github.com/zksync-sdk/zksync2-java'
organization {
name = 'Matter Labs'
url = 'https://matter-labs.io'
}
licenses {
license {
name = 'MIT License'
url = 'https://www.mit.edu/~amini/LICENSE.md'
}
}
developers {
developer {
id = 'matterLabs'
name = 'Matter Labs'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/zksync-sdk/zksync2-java'
url = 'https://github.com/zksync-sdk/zksync2-java'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username findProperty("sonatypeUsername")
password findProperty("sonatypePassword")
}
}
}
}
signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype {
username = findProperty("sonatypeUsername")
password = findProperty("sonatypePassword")
stagingProfileId = findProperty("stagingProfileId")
}
}
}
dependencies {
// === Code Generation ===
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
// === Utils ===
implementation 'org.apache.commons:commons-lang3:3.12.0'
// === Web3 client ===
implementation 'org.web3j:core:4.9.7'
// === Web3 abi ===
implementation 'org.web3j:abi:4.9.7'
// === For Eth Signing ===
implementation 'org.web3j:crypto:4.9.7'
// === Test dependencies ===
testImplementation 'org.mockito:mockito-inline:4.7.0'
testImplementation(platform('org.junit:junit-bom:5.9.0'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}