Skip to content

Commit 20fc9b9

Browse files
feat(dependency): refactor gradle dependencies (#5625)
1 parent ce0e0c6 commit 20fc9b9

File tree

8 files changed

+10
-101
lines changed

8 files changed

+10
-101
lines changed

actuator/build.gradle

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
description = "actuator – a series of transactions for blockchain."
22

3-
// Dependency versions
4-
// ---------------------------------------
5-
6-
def junitVersion = "4.13.2"
7-
def mockitoVersion = "2.1.0"
8-
def testNgVersion = "6.11"
9-
def slf4jVersion = "1.7.25"
10-
// --------------------------------------
11-
123
dependencies {
134
compile project(":chainbase")
145
compile project(":protocol")
156
compile project(":crypto")
16-
testImplementation "junit:junit:$junitVersion"
17-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
18-
19-
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
20-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
21-
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
22-
compile 'org.reflections:reflections:0.9.11'
237
}
248

259
test {

build.gradle

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ subprojects {
3838
dependencies {
3939
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
4040
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
41-
compile "org.slf4j:jcl-over-slf4j:1.7.25"
4241
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
43-
compileOnly 'org.projectlombok:lombok:1.18.12'
44-
annotationProcessor 'org.projectlombok:lombok:1.18.12'
45-
testCompileOnly 'org.projectlombok:lombok:1.18.12'
46-
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
4742
compile group: 'com.google.guava', name: 'guava', version: '30.1-jre'
4843
compile "com.google.code.findbugs:jsr305:3.0.0"
4944
compile group: 'org.springframework', name: 'spring-context', version: '5.3.18'
@@ -52,7 +47,15 @@ subprojects {
5247
compile group: 'org.apache.commons', name: 'commons-math', version: '2.2'
5348
compile "org.apache.commons:commons-collections4:4.1"
5449
compile group: 'joda-time', name: 'joda-time', version: '2.3'
50+
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
51+
52+
compileOnly 'org.projectlombok:lombok:1.18.12'
53+
annotationProcessor 'org.projectlombok:lombok:1.18.12'
54+
testCompileOnly 'org.projectlombok:lombok:1.18.12'
55+
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
5556

57+
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
58+
testImplementation "org.mockito:mockito-core:2.1.0"
5659
}
5760

5861
task sourcesJar(type: Jar, dependsOn: classes) {

chainbase/build.gradle

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,16 @@ description = "chainbase – a decentralized database for blockchain."
22

33
// Dependency versions
44
// ---------------------------------------
5-
6-
def junitVersion = "4.13.2"
7-
def mockitoVersion = "2.1.0"
8-
def testNgVersion = "6.11"
95
def jacocoVersion = "0.8.0"
10-
def leveldbVersion = "1.8"
116
def jansiVersion = "1.16"
127
// --------------------------------------
138

14-
static def isWindows() {
15-
return org.gradle.internal.os.OperatingSystem.current().isWindows()
16-
}
17-
18-
if (isWindows()) {
19-
ext {
20-
leveldbGroup = "org.ethereum"
21-
leveldbName = "leveldbjni-all"
22-
leveldbVersion = "1.18.3"
23-
}
24-
} else {
25-
ext {
26-
leveldbGroup = "org.fusesource.leveldbjni"
27-
leveldbName = "leveldbjni-all"
28-
leveldbVersion = "1.8"
29-
}
30-
}
31-
329
dependencies {
33-
testImplementation "junit:junit:$junitVersion"
34-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
35-
36-
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion
37-
compile "org.fusesource.jansi:jansi:$jansiVersion"
38-
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
39-
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
40-
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
41-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.5'
4210
compile project(":protocol")
4311
compile project(":common")
4412
compile project(":crypto")
13+
compile "org.fusesource.jansi:jansi:$jansiVersion"
14+
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
4515
compile 'org.reflections:reflections:0.9.11'
4616
}
4717

common/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ sourceCompatibility = 1.8
88

99
// Dependency versions
1010
// ---------------------------------------
11-
1211
def leveldbVersion = "1.8"
1312
// --------------------------------------
1413

@@ -30,13 +29,7 @@ if (isWindows()) {
3029
}
3130
}
3231

33-
repositories {
34-
mavenCentral()
35-
}
36-
3732
dependencies {
38-
testCompile group: 'junit', name: 'junit', version: '4.13.2'
39-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
4033
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.1'
4134
compile "com.cedarsoftware:java-util:1.8.0"
4235
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'

consensus/build.gradle

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
description = "consensus – a distributed consensus arithmetic for blockchain."
22

3-
// Dependency versions
4-
// ---------------------------------------
5-
def junitVersion = "4.13.2"
6-
def mockitoVersion = "2.1.0"
7-
def testNgVersion = "6.11"
8-
def slf4jVersion = "1.7.25"
9-
// --------------------------------------
10-
113
dependencies {
124
compile project(":chainbase")
135
compile project(":protocol")
14-
testImplementation "junit:junit:$junitVersion"
15-
testImplementation "org.mockito:mockito-core:$mockitoVersion"
16-
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
17-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
18-
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
196
}
207

218
test {

crypto/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ repositories {
1111
}
1212

1313
dependencies {
14-
testCompile group: 'junit', name: 'junit', version: '4.13.2'
15-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
1614
compile project(":common")
1715
}
1816

framework/build.gradle

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,40 +40,17 @@ dependencies {
4040
//local libraries
4141
compile fileTree(dir: 'libs', include: '*.jar')
4242
// end local libraries
43-
testCompile group: 'junit', name: 'junit', version: '4.13.2'
44-
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.13.0'
4543
testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
4644
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.16.0'
4745

48-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
49-
50-
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
51-
52-
compile "com.cedarsoftware:java-util:1.8.0"
53-
54-
compile group: 'com.beust', name: 'jcommander', version: '1.72'
55-
56-
compile group: 'junit', name: 'junit', version: '4.13.2'
57-
58-
compile group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
59-
6046
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
61-
62-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.5'
63-
6447
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
6548
compile group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
66-
6749
compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
68-
69-
//compile 'com.googlecode.cqengine:cqengine:2.12.4'
70-
compile group: 'com.google.api.grpc', name: 'proto-google-common-protos', version: '2.15.0'
71-
7250
// http
7351
compile 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
7452
compile 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
7553
compile 'com.alibaba:fastjson:1.2.83'
76-
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
7754
// end http
7855

7956
// https://mvnrepository.com/artifact/com.github.briandilley.jsonrpc4j/jsonrpc4j

plugins/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ configurations.getByName('checkstyleConfig') {
2626
dependencies {
2727
//local libraries
2828
compile fileTree(dir: 'libs', include: '*.jar')
29-
testCompile group: 'junit', name: 'junit', version: '4.13.2'
30-
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.13.0'
31-
testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
3229
testCompile project(":framework")
3330
testCompile project(":framework").sourceSets.test.output
3431
compile group: 'info.picocli', name: 'picocli', version: '4.6.3'

0 commit comments

Comments
 (0)