Skip to content

Commit

Permalink
feat(dependencies): update dependencies
Browse files Browse the repository at this point in the history
  1. grpc
  2. jcommander
  3. pf4j
  • Loading branch information
halibobo1205 committed Aug 20, 2024
1 parent aa9836e commit 564f74d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2,648 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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
49 changes: 19 additions & 30 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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 @@ -61,7 +62,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.2.0.RELEASE'
testImplementation group: 'org.springframework', name: 'spring-web', version: '5.2.0.RELEASE'
Expand Down Expand Up @@ -150,33 +153,6 @@ jacocoTestReport {
getExecutionData().setFrom(fileTree('../framework/build/jacoco').include("**.exec"))
}

def binaryRelease(taskName, jarName, mainClass) {
return tasks.create("${taskName}", Jar) {
baseName = jarName
version = null
from(sourceSets.main.output) {
include "/**"
}

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 @@ -219,10 +195,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
}

task copyToParent(type: 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
Loading

0 comments on commit 564f74d

Please sign in to comment.