-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
75 lines (61 loc) · 2.08 KB
/
build.gradle
File metadata and controls
75 lines (61 loc) · 2.08 KB
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
plugins {
id 'application'
id 'com.google.protobuf' version '0.8.13'
id 'idea'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
def grpcVersion = '1.32.1'
def protobufVersion = '3.12.0'
def protocVersion = protobufVersion
def reactiveGrpcVersion = "1.0.1"
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
rxgrpc { artifact = "com.salesforce.servicelibs:rxgrpc:${reactiveGrpcVersion}" }
reactor { artifact = "com.salesforce.servicelibs:reactor-grpc:${reactiveGrpcVersion}" }
}
generateProtoTasks {
all()*.plugins {
grpc {}
rxgrpc {}
reactor {}}
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "com.salesforce.servicelibs:reactive-grpc:${reactiveGrpcVersion}"
implementation "com.salesforce.servicelibs:rxgrpc-stub:${reactiveGrpcVersion}"
implementation "com.salesforce.servicelibs:reactor-grpc-stub:${reactiveGrpcVersion}"
implementation "io.reactivex.rxjava2:rxjava:2.2.10"
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}" //todo needed?
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
testImplementation "junit:junit:4.12"
testImplementation "org.mockito:mockito-core:2.28.2"
}
startScripts.enabled = false
task grpcServer(type: CreateStartScripts) {
mainClassName = 'io.zebless.grpcserver.GrpcServer'
applicationName = 'grpc-server'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}
applicationDistribution.into('bin') {
from(grpcServer)
fileMode = 0755
}