Skip to content

Commit

Permalink
feat(dependencies): update dependencies
Browse files Browse the repository at this point in the history
  1. grpc-java
  2. jcommander
  3. pf4j
  • Loading branch information
halibobo1205 committed Aug 20, 2024
1 parent a1ae5a2 commit d3c268a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 40 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
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.beust', name: 'jcommander', version: '1.78'
api group: 'com.typesafe', name: 'config', version: '1.3.2'
api group: leveldbGroup, name: leveldbName, version: leveldbVersion
api group: 'org.rocksdb', name: 'rocksdbjni', version: '7.7.3'
Expand Down
51 changes: 19 additions & 32 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gitProperties.failOnNoGitDirectory = false;

apply plugin: 'application'
apply plugin: 'checkstyle'
apply plugin: 'com.github.johnrengelman.shadow'

mainClassName = 'org.tron.program.FullNode'

Expand Down Expand Up @@ -70,7 +71,9 @@ dependencies {
compileOnly group: 'javax.portlet', name: 'portlet-api', version: '3.0.1'

implementation "io.vavr:vavr:0.9.2"
implementation group: 'org.pf4j', name: 'pf4j', version: '2.5.0'
implementation group: 'org.pf4j', name: 'pf4j', version: '3.10.0',{
exclude group: 'org.slf4j', module: 'slf4j-api'
}

testImplementation group: 'org.springframework', name: 'spring-test', version: '5.3.37'
testImplementation group: 'org.springframework', name: 'spring-web', version: '5.3.37'
Expand Down Expand Up @@ -159,35 +162,6 @@ jacocoTestReport {
getExecutionData().setFrom(fileTree('../framework/build/jacoco').include("**.exec"))
}

def binaryRelease(taskName, jarName, mainClass) {
return tasks.register("${taskName}", Jar) {
baseName = jarName
version = null
from(sourceSets.main.output) {
include "/**"
}
// explicit_dependency
dependsOn (project(':actuator').jar, project(':consensus').jar, project(':chainbase').jar,
project(':crypto').jar, project(':common').jar, project(':protocol').jar)
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}

// exclude these files for bouncycastle
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"

manifest {
attributes "Main-Class": "${mainClass}"
}

// classifier(jarName)
}
}

def createScript(project, mainClass, name) {
project.tasks.create(name: name, type: CreateStartScripts) {
unixStartScriptGenerator.template = resources.text.fromFile('../gradle/unixStartScript.txt')
Expand Down Expand Up @@ -230,10 +204,23 @@ tasks.distTar.enabled = false

createScript(project, 'org.tron.program.FullNode', 'FullNode')

artifacts {
archives(binaryRelease('buildFullNodeJar', 'FullNode', 'org.tron.program.FullNode'))
shadowJar {
baseName = 'FullNode'
classifier = null
version = null
// exclude these files for bouncycastle
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
mergeServiceFiles() // https://github.com/grpc/grpc-java/issues/10853
}
shadowDistZip {
enabled = false
}

startShadowScripts {
enabled = false
}

tasks.register('copyToParent', Copy) {
into "../build/distributions"
Expand Down
13 changes: 7 additions & 6 deletions framework/src/main/java/org/tron/core/config/args/Args.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,15 @@ private static void printVersion() {
} catch (IOException e) {
logger.error(e.getMessage());
}
JCommander.getConsole().println("OS : " + System.getProperty("os.name"));
JCommander.getConsole().println("JVM : " + System.getProperty("java.vendor") + " "
JCommander jCommander = JCommander.newBuilder().build();
jCommander.getConsole().println("OS : " + System.getProperty("os.name"));
jCommander.getConsole().println("JVM : " + System.getProperty("java.vendor") + " "
+ System.getProperty("java.version") + " " + System.getProperty("os.arch"));
if (!noGitProperties) {
JCommander.getConsole().println("Git : " + properties.getProperty("git.commit.id"));
jCommander.getConsole().println("Git : " + properties.getProperty("git.commit.id"));
}
JCommander.getConsole().println("Version : " + Version.getVersion());
JCommander.getConsole().println("Code : " + Version.VERSION_CODE);
jCommander.getConsole().println("Version : " + Version.getVersion());
jCommander.getConsole().println("Code : " + Version.VERSION_CODE);
}

public static void printHelp(JCommander jCommander) {
Expand Down Expand Up @@ -309,7 +310,7 @@ public static void printHelp(JCommander jCommander) {
helpStr.append(tmpOptionDesc);
}
}
JCommander.getConsole().println(helpStr.toString());
jCommander.getConsole().println(helpStr.toString());
}

public static String upperFirst(String name) {
Expand Down
2 changes: 1 addition & 1 deletion protocol/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
apply plugin: 'com.google.protobuf'

def protobufVersion = '3.21.12'
def grpcVersion = '1.52.1'
def grpcVersion = '1.60.0'

dependencies {
api group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion
Expand Down

0 comments on commit d3c268a

Please sign in to comment.