-
Notifications
You must be signed in to change notification settings - Fork 436
/
build.gradle
133 lines (112 loc) · 4.08 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
group 'Tron'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
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"
//]
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
def protobufVersion = "3.25.5"
def grpcVersion = "1.60.0"
sourceSets {
main {
proto {
srcDir 'src/main/protos'
}
java {
srcDir 'src/main/gen'
srcDir 'src/main/java'
}
}
}
buildscript {
repositories {
mavenLocal()
maven {
url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
}
mavenCentral()
}
dependencies {
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"
}
}
dependencies {
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'
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'
}
protobuf {
generatedFilesBaseDir = "$projectDir/src"
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
outputSubDir = "gen"
}
}
}
all()*.plugins {
grpc {
outputSubDir = "gen"
}
}
}
}
clean.doFirst {
delete "src/main/gen"
}
run {
standardInput = System.in
mainClassName = 'org.tron.walletcli.Client'
}
shadowJar {
baseName = 'wallet-cli'
classifier = null
version = null
mergeServiceFiles() // https://github.com/grpc/grpc-java/issues/10853
}