Skip to content

Commit c33e747

Browse files
committed
compile is deprecated replace with implementation or api
1 parent 285e115 commit c33e747

File tree

10 files changed

+83
-83
lines changed

10 files changed

+83
-83
lines changed

actuator/build.gradle

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

33
dependencies {
4-
compile project(":chainbase")
5-
compile project(":protocol")
6-
compile project(":crypto")
4+
api project(":chainbase")
5+
api project(":protocol")
6+
api project(":crypto")
77
}
88

99
test {

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ subprojects {
3434
}
3535

3636
dependencies {
37-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
38-
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
39-
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
40-
compile group: 'com.google.guava', name: 'guava', version: '30.1-jre'
41-
compile "com.google.code.findbugs:jsr305:3.0.0"
42-
compile group: 'org.springframework', name: 'spring-context', version: '5.3.18'
43-
compile group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
44-
compile "org.apache.commons:commons-lang3:3.4"
45-
compile group: 'org.apache.commons', name: 'commons-math', version: '2.2'
46-
compile "org.apache.commons:commons-collections4:4.1"
47-
compile group: 'joda-time', name: 'joda-time', version: '2.3'
48-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
37+
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
38+
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
39+
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
40+
implementation group: 'com.google.guava', name: 'guava', version: '30.1-jre'
41+
implementation "com.google.code.findbugs:jsr305:3.0.0"
42+
implementation group: 'org.springframework', name: 'spring-context', version: '5.3.18'
43+
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
44+
implementation "org.apache.commons:commons-lang3:3.4"
45+
implementation group: 'org.apache.commons', name: 'commons-math', version: '2.2'
46+
implementation "org.apache.commons:commons-collections4:4.1"
47+
implementation group: 'joda-time', name: 'joda-time', version: '2.3'
48+
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
4949

5050
compileOnly 'org.projectlombok:lombok:1.18.12'
5151
annotationProcessor 'org.projectlombok:lombok:1.18.12'

chainbase/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ def jansiVersion = "1.16"
77
// --------------------------------------
88

99
dependencies {
10-
compile project(":protocol")
11-
compile project(":common")
12-
compile project(":crypto")
13-
compile "org.fusesource.jansi:jansi:$jansiVersion"
14-
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
15-
compile 'org.reflections:reflections:0.9.11'
10+
api project(":protocol")
11+
api project(":common")
12+
api project(":crypto")
13+
api "org.fusesource.jansi:jansi:$jansiVersion"
14+
api 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
15+
api 'org.reflections:reflections:0.9.11'
1616
}
1717

1818

common/build.gradle

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,30 @@ if (isWindows()) {
3030
}
3131

3232
dependencies {
33-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.1'
34-
compile "com.cedarsoftware:java-util:1.8.0"
35-
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
36-
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
37-
compile group: 'com.beust', name: 'jcommander', version: '1.72'
38-
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
39-
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion
40-
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
33+
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.1'
34+
api "com.cedarsoftware:java-util:1.8.0"
35+
api group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
36+
api group: 'commons-codec', name: 'commons-codec', version: '1.11'
37+
api group: 'com.beust', name: 'jcommander', version: '1.72'
38+
api group: 'com.typesafe', name: 'config', version: '1.3.2'
39+
api group: leveldbGroup, name: leveldbName, version: leveldbVersion
40+
api group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
4141
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
42-
compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
43-
compile group: 'io.prometheus', name: 'simpleclient', version: '0.15.0'
44-
compile group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.15.0'
45-
compile group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.15.0'
46-
compile 'org.aspectj:aspectjrt:1.8.13'
47-
compile 'org.aspectj:aspectjweaver:1.8.13'
48-
compile 'org.aspectj:aspectjtools:1.8.13'
49-
compile group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.1',{
42+
api group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
43+
api group: 'io.prometheus', name: 'simpleclient', version: '0.15.0'
44+
api group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.15.0'
45+
api group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.15.0'
46+
api 'org.aspectj:aspectjrt:1.8.13'
47+
api 'org.aspectj:aspectjweaver:1.8.13'
48+
api 'org.aspectj:aspectjtools:1.8.13'
49+
api group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.1',{
5050
exclude group: 'io.grpc', module: 'grpc-context'
5151
exclude group: 'io.grpc', module: 'grpc-core'
5252
exclude group: 'io.grpc', module: 'grpc-netty'
5353
exclude group: 'com.google.protobuf', module: 'protobuf-java'
5454
exclude group: 'com.google.protobuf', module: 'protobuf-java-util'
5555
}
56-
compile project(":protocol")
56+
api project(":protocol")
5757
}
5858

5959
jacocoTestReport {

consensus/build.gradle

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

33
dependencies {
4-
compile project(":chainbase")
5-
compile project(":protocol")
4+
api project(":chainbase")
5+
api project(":protocol")
66
}
77

88
test {

crypto/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
}
1212

1313
dependencies {
14-
compile project(":common")
14+
api project(":common")
1515
}
1616

1717
jacocoTestReport {

example/actuator-example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
description = "actuator-example – a example of actuator."
22

33
dependencies {
4-
compile project(":actuator")
4+
api project(":actuator")
55
}
66

framework/build.gradle

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,38 +38,38 @@ task version(type: Exec) {
3838

3939
dependencies {
4040
//local libraries
41-
compile fileTree(dir: 'libs', include: '*.jar')
41+
implementation fileTree(dir: 'libs', include: '*.jar')
4242
// end local libraries
43-
testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
44-
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.16.0'
43+
testImplementation group: 'org.hamcrest', name: 'hamcrest-junit', version: '1.0.0.1'
44+
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.16.0'
4545

46-
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
47-
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
48-
compile group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
49-
compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
46+
implementation group: 'com.google.inject', name: 'guice', version: '4.1.0'
47+
implementation group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
48+
implementation group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
49+
implementation group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
5050
// http
51-
compile 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
52-
compile 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
53-
compile 'com.alibaba:fastjson:1.2.83'
51+
implementation 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
52+
implementation 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
53+
implementation 'com.alibaba:fastjson:1.2.83'
5454
// end http
5555

5656
// https://mvnrepository.com/artifact/com.github.briandilley.jsonrpc4j/jsonrpc4j
57-
compile group: 'com.github.briandilley.jsonrpc4j', name: 'jsonrpc4j', version: '1.6'
57+
implementation group: 'com.github.briandilley.jsonrpc4j', name: 'jsonrpc4j', version: '1.6'
5858

5959
// https://mvnrepository.com/artifact/javax.portlet/portlet-api
6060
compileOnly group: 'javax.portlet', name: 'portlet-api', version: '3.0.1'
6161

62-
compile "io.vavr:vavr:0.9.2"
63-
compile group: 'org.pf4j', name: 'pf4j', version: '2.5.0'
62+
implementation "io.vavr:vavr:0.9.2"
63+
implementation group: 'org.pf4j', name: 'pf4j', version: '2.5.0'
6464

6565
testImplementation group: 'org.springframework', name: 'spring-test', version: '5.2.0.RELEASE'
6666
testImplementation group: 'org.springframework', name: 'spring-web', version: '5.2.0.RELEASE'
6767

68-
compile group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
69-
compile project(":chainbase")
70-
compile project(":protocol")
71-
compile project(":actuator")
72-
compile project(":consensus")
68+
implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
69+
api project(":chainbase")
70+
api project(":protocol")
71+
api project(":actuator")
72+
api project(":consensus")
7373
}
7474

7575
check.dependsOn 'lint'
@@ -154,7 +154,7 @@ def binaryRelease(taskName, jarName, mainClass) {
154154
}
155155

156156
from {
157-
configurations.compile.collect {
157+
configurations.runtimeClasspath.collect {
158158
it.isDirectory() ? it : zipTree(it)
159159
}
160160
}
@@ -179,7 +179,7 @@ def createScript(project, mainClass, name) {
179179
outputDir = new File(project.buildDir, 'scripts')
180180
mainClassName = mainClass
181181
applicationName = name
182-
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtime
182+
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtimeClasspath
183183
// defaultJvmOpts = ['-XX:+UseConcMarkSweepGC',
184184
// '-XX:+PrintGCDetails',
185185
// '-Xloggc:./gc.log',

plugins/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ configurations.getByName('checkstyleConfig') {
2525

2626
dependencies {
2727
//local libraries
28-
compile fileTree(dir: 'libs', include: '*.jar')
29-
testCompile project(":framework")
30-
testCompile project(":framework").sourceSets.test.output
31-
compile group: 'info.picocli', name: 'picocli', version: '4.6.3'
32-
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
33-
compile group: 'me.tongfei', name: 'progressbar', version: '0.9.3'
34-
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
35-
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
36-
compile 'io.github.tronprotocol:leveldbjni-all:1.18.2'
37-
compile 'io.github.tronprotocol:leveldb:1.18.2'
38-
compile project(":protocol")
28+
implementation fileTree(dir: 'libs', include: '*.jar')
29+
testImplementation project(":framework")
30+
testImplementation project(":framework").sourceSets.test.output
31+
implementation group: 'info.picocli', name: 'picocli', version: '4.6.3'
32+
implementation group: 'com.typesafe', name: 'config', version: '1.3.2'
33+
implementation group: 'me.tongfei', name: 'progressbar', version: '0.9.3'
34+
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
35+
implementation group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
36+
implementation 'io.github.tronprotocol:leveldbjni-all:1.18.2'
37+
implementation 'io.github.tronprotocol:leveldb:1.18.2'
38+
implementation project(":protocol")
3939
}
4040

4141
check.dependsOn 'lint'
@@ -99,7 +99,7 @@ def binaryRelease(taskName, jarName, mainClass) {
9999
}
100100

101101
from {
102-
configurations.compile.collect {
102+
configurations.runtimeClasspath.collect { // https://docs.gradle.org/current/userguide/upgrading_version_6.html#changes_6.3
103103
it.isDirectory() ? it : zipTree(it)
104104
}
105105
}
@@ -120,7 +120,7 @@ def createScript(project, mainClass, name) {
120120
outputDir = new File(project.buildDir, 'scripts')
121121
mainClassName = mainClass
122122
applicationName = name
123-
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtime
123+
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtimeClasspath
124124
}
125125
project.tasks[name].dependsOn(project.jar)
126126
project.applicationDistribution.with {

protocol/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ def protobufVersion = '3.21.12'
44
def grpcVersion = '1.52.1'
55

66
dependencies {
7-
compile group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion
8-
compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: protobufVersion
9-
compile group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
7+
api group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion
8+
api group: 'com.google.protobuf', name: 'protobuf-java-util', version: protobufVersion
9+
api group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
1010

1111
// checkstyleConfig "com.puppycrawl.tools:checkstyle:${versions.checkstyle}"
1212
// google grpc
13-
compile group: 'io.grpc', name: 'grpc-netty', version: grpcVersion
14-
compile group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
15-
compile group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
16-
compile group: 'io.grpc', name: 'grpc-services', version: grpcVersion
13+
api group: 'io.grpc', name: 'grpc-netty', version: grpcVersion
14+
api group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
15+
api group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
16+
api group: 'io.grpc', name: 'grpc-services', version: grpcVersion
1717

1818
// end google grpc
1919

20-
compile group: 'com.google.api.grpc', name: 'proto-google-common-protos', version: '2.15.0'
20+
api group: 'com.google.api.grpc', name: 'proto-google-common-protos', version: '2.15.0'
2121
}
2222

2323
tasks.matching { it instanceof Test }.all {

0 commit comments

Comments
 (0)