-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(build): update gradle from 4.0 to 6.3 #745
Changes from 9 commits
1886d05
9606fe2
286c254
9bba8c7
05b6e96
e6c54bf
1503b40
fc4cbfc
342b413
0ab3e47
cd4b5ed
cb3dd84
2771dd9
1e3286d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,19 +10,22 @@ sourceCompatibility = 1.8 | |
targetCompatibility = JavaVersion.VERSION_1_8 | ||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | ||
|
||
compileJava.options*.compilerArgs = [ | ||
"-Xlint:serial", "-Xlint:varargs", "-Xlint:classfile", "-Xlint:dep-ann", | ||
"-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides", | ||
"-Xlint:path", "-Xlint:static", "-Xlint:try", "-Xlint:fallthrough", | ||
"-Xlint:deprecation", "-Xlint:unchecked", "-Xlint:-options" | ||
] | ||
//compileJava.options*.compilerArgs = [ | ||
// "-Xlint:serial", "-Xlint:varargs", "-Xlint:classfile", "-Xlint:dep-ann", | ||
// "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides", | ||
// "-Xlint:path", "-Xlint:static", "-Xlint:try", "-Xlint:fallthrough", | ||
// "-Xlint:deprecation", "-Xlint:unchecked", "-Xlint:-options" | ||
//] | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url 'https://jitpack.io' } | ||
} | ||
|
||
def protobufVersion = "3.25.5" | ||
def grpcVersion = "1.60.0" | ||
|
||
sourceSets { | ||
main { | ||
proto { | ||
|
@@ -33,8 +36,8 @@ sourceSets { | |
srcDir 'src/main/java' | ||
} | ||
} | ||
|
||
} | ||
|
||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
|
@@ -43,59 +46,57 @@ buildscript { | |
} | ||
mavenCentral() | ||
} | ||
ext { | ||
projectVersion = '1.3.0-RELEASE' | ||
grpcVersion = '1.60.0' | ||
protobufVersion = '3.21.12' | ||
protobufGradlePluginVersion = '0.8.0' | ||
} | ||
|
||
dependencies { | ||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' | ||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3' | ||
classpath "gradle.plugin.com.liferay:gradle-plugins-node:4.3.0" | ||
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0' | ||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' | ||
classpath "gradle.plugin.com.liferay:gradle-plugins-node:7.0.2" | ||
} | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '3.3' | ||
} | ||
|
||
dependencies { | ||
compile group: 'junit', name: 'junit', version: '4.13.2' | ||
compile group: 'com.beust', name: 'jcommander', version: '1.82' | ||
implementation group: 'junit', name: 'junit', version: '4.13.2' | ||
implementation group: 'com.beust', name: 'jcommander', version: '1.82' | ||
//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.13' | ||
|
||
// 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: 'com.googlecode.protobuf-java-format', name: 'protobuf-java-format', version: '1.4' | ||
compile group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.78.1' | ||
compile group: 'com.typesafe', name: 'config', version: '1.3.2' | ||
compile "org.apache.commons:commons-lang3:3.14.0" | ||
compile group: 'com.google.api.grpc', name: 'googleapis-common-protos', version: '0.0.3' | ||
compile 'com.alibaba:fastjson:1.2.83' | ||
|
||
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1' | ||
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.2' | ||
|
||
compile group: 'org.jline', name: 'jline', version: '3.25.0' | ||
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0' | ||
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25' | ||
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.13' | ||
|
||
// grpc | ||
implementation group: 'io.grpc', name: 'grpc-netty', version: grpcVersion | ||
implementation group: 'io.grpc', name: 'grpc-protobuf', version: grpcVersion | ||
implementation group: 'io.grpc', name: 'grpc-stub', version: grpcVersion | ||
|
||
// google protobuf | ||
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion | ||
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: protobufVersion | ||
|
||
implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0' | ||
|
||
implementation group: 'com.googlecode.protobuf-java-format', name: 'protobuf-java-format', version: '1.4' | ||
implementation group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.78.1' | ||
implementation group: 'com.typesafe', name: 'config', version: '1.3.2' | ||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0' | ||
implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.83' | ||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1' | ||
|
||
compileOnly 'org.projectlombok:lombok:1.18.24' | ||
annotationProcessor 'org.projectlombok:lombok:1.18.24' | ||
testCompileOnly 'org.projectlombok:lombok:1.18.24' | ||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' | ||
|
||
implementation group: 'org.jline', name: 'jline', version: '3.25.0' | ||
implementation group: 'io.github.tronprotocol', name: 'zksnark-java-sdk', version: '1.0.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's best to keep these upgraded versions consistent with Java tron. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version of grpc、protobuf is same as that used in java-tron. Other dependency is not very important. jline and zksnark-java-sdk is not changed. |
||
} | ||
|
||
protobuf { | ||
generatedFilesBaseDir = "$projectDir/src/" | ||
generatedFilesBaseDir = "$projectDir/src" | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:${protobufVersion}" | ||
|
||
artifact = "com.google.protobuf:protoc:$protobufVersion" | ||
} | ||
plugins { | ||
grpc { | ||
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" | ||
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" | ||
} | ||
} | ||
generateProtoTasks { | ||
|
@@ -114,6 +115,10 @@ protobuf { | |
} | ||
} | ||
|
||
clean.doFirst { | ||
delete "src/main/gen" | ||
} | ||
|
||
run { | ||
standardInput = System.in | ||
mainClassName = 'org.tron.walletcli.Client' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 51, this version is 7.1.2 in java-tron.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which dependency ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2" . This version of Shadow supports Gradle 7.0+ only. So 5.2.0 is available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lxcmyf shadow is not necessary for java-tron. You can try to compile it without shadow.