-
Notifications
You must be signed in to change notification settings - Fork 421
/
build.gradle
128 lines (110 loc) · 3.68 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
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' }
}
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()
}
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"
}
}
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'
//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'
}
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"
}
}
}
}
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
}