Skip to content

Commit

Permalink
update gradle to 6.4 and protobufVersion,grpcVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
317787106 committed Sep 24, 2024
1 parent 05b6e96 commit e6c54bf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 44 deletions.
92 changes: 49 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -33,8 +36,8 @@ sourceSets {
srcDir 'src/main/java'
}
}

}

buildscript {
repositories {
mavenLocal()
Expand All @@ -43,59 +46,58 @@ 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'
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.13'

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'

// 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: '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

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'
implementation group: 'org.projectlombok', name: 'lombok', version: '1.18.12'

implementation group: 'org.jline', name: 'jline', version: '3.25.0'
implementation 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
}

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 {
Expand All @@ -114,6 +116,10 @@ protobuf {
}
}

clean.doFirst {
delete "src/main/gen"
}

run {
standardInput = System.in
mainClassName = 'org.tron.walletcli.Client'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

0 comments on commit e6c54bf

Please sign in to comment.