Skip to content

Commit

Permalink
compile is deprecated replace with implementation or api
Browse files Browse the repository at this point in the history
  • Loading branch information
halibobo1205 committed Jun 20, 2024
1 parent 285e115 commit c33e747
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 83 deletions.
6 changes: 3 additions & 3 deletions actuator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
description = "actuator – a series of transactions for blockchain."

dependencies {
compile project(":chainbase")
compile project(":protocol")
compile project(":crypto")
api project(":chainbase")
api project(":protocol")
api project(":crypto")
}

test {
Expand Down
24 changes: 12 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ subprojects {
}

dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
compile group: 'com.google.guava', name: 'guava', version: '30.1-jre'
compile "com.google.code.findbugs:jsr305:3.0.0"
compile group: 'org.springframework', name: 'spring-context', version: '5.3.18'
compile group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
compile "org.apache.commons:commons-lang3:3.4"
compile group: 'org.apache.commons', name: 'commons-math', version: '2.2'
compile "org.apache.commons:commons-collections4:4.1"
compile group: 'joda-time', name: 'joda-time', version: '2.3'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
implementation group: 'com.google.guava', name: 'guava', version: '30.1-jre'
implementation "com.google.code.findbugs:jsr305:3.0.0"
implementation group: 'org.springframework', name: 'spring-context', version: '5.3.18'
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.18'
implementation "org.apache.commons:commons-lang3:3.4"
implementation group: 'org.apache.commons', name: 'commons-math', version: '2.2'
implementation "org.apache.commons:commons-collections4:4.1"
implementation group: 'joda-time', name: 'joda-time', version: '2.3'
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'

compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
Expand Down
12 changes: 6 additions & 6 deletions chainbase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ def jansiVersion = "1.16"
// --------------------------------------

dependencies {
compile project(":protocol")
compile project(":common")
compile project(":crypto")
compile "org.fusesource.jansi:jansi:$jansiVersion"
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
compile 'org.reflections:reflections:0.9.11'
api project(":protocol")
api project(":common")
api project(":crypto")
api "org.fusesource.jansi:jansi:$jansiVersion"
api 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
api 'org.reflections:reflections:0.9.11'
}


Expand Down
34 changes: 17 additions & 17 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,30 @@ if (isWindows()) {
}

dependencies {
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.1'
compile "com.cedarsoftware:java-util:1.8.0"
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
compile group: 'com.beust', name: 'jcommander', version: '1.72'
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
compile group: leveldbGroup, name: leveldbName, version: leveldbVersion
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.4.1'
api "com.cedarsoftware:java-util:1.8.0"
api group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.1'
api group: 'commons-codec', name: 'commons-codec', version: '1.11'
api group: 'com.beust', name: 'jcommander', version: '1.72'
api group: 'com.typesafe', name: 'config', version: '1.3.2'
api group: leveldbGroup, name: leveldbName, version: leveldbVersion
api group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
compile group: 'io.prometheus', name: 'simpleclient', version: '0.15.0'
compile group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.15.0'
compile group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.15.0'
compile 'org.aspectj:aspectjrt:1.8.13'
compile 'org.aspectj:aspectjweaver:1.8.13'
compile 'org.aspectj:aspectjtools:1.8.13'
compile group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.1',{
api group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
api group: 'io.prometheus', name: 'simpleclient', version: '0.15.0'
api group: 'io.prometheus', name: 'simpleclient_httpserver', version: '0.15.0'
api group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.15.0'
api 'org.aspectj:aspectjrt:1.8.13'
api 'org.aspectj:aspectjweaver:1.8.13'
api 'org.aspectj:aspectjtools:1.8.13'
api group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.1',{
exclude group: 'io.grpc', module: 'grpc-context'
exclude group: 'io.grpc', module: 'grpc-core'
exclude group: 'io.grpc', module: 'grpc-netty'
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'com.google.protobuf', module: 'protobuf-java-util'
}
compile project(":protocol")
api project(":protocol")
}

jacocoTestReport {
Expand Down
4 changes: 2 additions & 2 deletions consensus/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description = "consensus – a distributed consensus arithmetic for blockchain."

dependencies {
compile project(":chainbase")
compile project(":protocol")
api project(":chainbase")
api project(":protocol")
}

test {
Expand Down
2 changes: 1 addition & 1 deletion crypto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}

dependencies {
compile project(":common")
api project(":common")
}

jacocoTestReport {
Expand Down
2 changes: 1 addition & 1 deletion example/actuator-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description = "actuator-example – a example of actuator."

dependencies {
compile project(":actuator")
api project(":actuator")
}

40 changes: 20 additions & 20 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,38 @@ task version(type: Exec) {

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

compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
compile group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
compile group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
implementation group: 'com.google.inject', name: 'guice', version: '4.1.0'
implementation group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
implementation group: 'com.github.davidb', name: 'metrics-influxdb', version: '0.8.2'
implementation group: 'com.carrotsearch', name: 'java-sizeof', version: '0.0.5'
// http
compile 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
compile 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
compile 'com.alibaba:fastjson:1.2.83'
implementation 'org.eclipse.jetty:jetty-server:9.4.53.v20231009'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
implementation 'com.alibaba:fastjson:1.2.83'
// end http

// https://mvnrepository.com/artifact/com.github.briandilley.jsonrpc4j/jsonrpc4j
compile group: 'com.github.briandilley.jsonrpc4j', name: 'jsonrpc4j', version: '1.6'
implementation group: 'com.github.briandilley.jsonrpc4j', name: 'jsonrpc4j', version: '1.6'

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

compile "io.vavr:vavr:0.9.2"
compile group: 'org.pf4j', name: 'pf4j', version: '2.5.0'
implementation "io.vavr:vavr:0.9.2"
implementation group: 'org.pf4j', name: 'pf4j', version: '2.5.0'

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

compile group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
compile project(":chainbase")
compile project(":protocol")
compile project(":actuator")
compile project(":consensus")
implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
api project(":chainbase")
api project(":protocol")
api project(":actuator")
api project(":consensus")
}

check.dependsOn 'lint'
Expand Down Expand Up @@ -154,7 +154,7 @@ def binaryRelease(taskName, jarName, mainClass) {
}

from {
configurations.compile.collect {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
Expand All @@ -179,7 +179,7 @@ def createScript(project, mainClass, name) {
outputDir = new File(project.buildDir, 'scripts')
mainClassName = mainClass
applicationName = name
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtime
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtimeClasspath
// defaultJvmOpts = ['-XX:+UseConcMarkSweepGC',
// '-XX:+PrintGCDetails',
// '-Xloggc:./gc.log',
Expand Down
26 changes: 13 additions & 13 deletions plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ configurations.getByName('checkstyleConfig') {

dependencies {
//local libraries
compile fileTree(dir: 'libs', include: '*.jar')
testCompile project(":framework")
testCompile project(":framework").sourceSets.test.output
compile group: 'info.picocli', name: 'picocli', version: '4.6.3'
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
compile group: 'me.tongfei', name: 'progressbar', version: '0.9.3'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
compile 'io.github.tronprotocol:leveldbjni-all:1.18.2'
compile 'io.github.tronprotocol:leveldb:1.18.2'
compile project(":protocol")
implementation fileTree(dir: 'libs', include: '*.jar')
testImplementation project(":framework")
testImplementation project(":framework").sourceSets.test.output
implementation group: 'info.picocli', name: 'picocli', version: '4.6.3'
implementation group: 'com.typesafe', name: 'config', version: '1.3.2'
implementation group: 'me.tongfei', name: 'progressbar', version: '0.9.3'
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
implementation group: 'org.rocksdb', name: 'rocksdbjni', version: '5.15.10'
implementation 'io.github.tronprotocol:leveldbjni-all:1.18.2'
implementation 'io.github.tronprotocol:leveldb:1.18.2'
implementation project(":protocol")
}

check.dependsOn 'lint'
Expand Down Expand Up @@ -99,7 +99,7 @@ def binaryRelease(taskName, jarName, mainClass) {
}

from {
configurations.compile.collect {
configurations.runtimeClasspath.collect { // https://docs.gradle.org/current/userguide/upgrading_version_6.html#changes_6.3
it.isDirectory() ? it : zipTree(it)
}
}
Expand All @@ -120,7 +120,7 @@ def createScript(project, mainClass, name) {
outputDir = new File(project.buildDir, 'scripts')
mainClassName = mainClass
applicationName = name
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtime
classpath = project.tasks[JavaPlugin.JAR_TASK_NAME].outputs.files + project.configurations.runtimeClasspath
}
project.tasks[name].dependsOn(project.jar)
project.applicationDistribution.with {
Expand Down
16 changes: 8 additions & 8 deletions protocol/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ def protobufVersion = '3.21.12'
def grpcVersion = '1.52.1'

dependencies {
compile group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion
compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: protobufVersion
compile group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
api group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion
api group: 'com.google.protobuf', name: 'protobuf-java-util', version: protobufVersion
api group: 'net.jcip', name: 'jcip-annotations', version: '1.0'

// checkstyleConfig "com.puppycrawl.tools:checkstyle:${versions.checkstyle}"
// google grpc
compile group: 'io.grpc', name: 'grpc-netty', version: grpcVersion
compile group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
compile group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
compile group: 'io.grpc', name: 'grpc-services', version: grpcVersion
api group: 'io.grpc', name: 'grpc-netty', version: grpcVersion
api group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion
api group: 'io.grpc', name: 'grpc-stub', version: grpcVersion
api group: 'io.grpc', name: 'grpc-services', version: grpcVersion

// end google grpc

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

tasks.matching { it instanceof Test }.all {
Expand Down

0 comments on commit c33e747

Please sign in to comment.