-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (64 loc) · 1.87 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
plugins {
id 'com.google.protobuf' version '0.8.11'
id 'idea'
id 'application'
id 'java'
}
repositories {
mavenCentral()
mavenLocal()
}
description = 'Comment Service'
group = "commentservice"
version = "0.1.0-SNAPSHOT"
def grpcVersion = "1.26.0"
def protocVersion = "3.11.4"
def opencensusVersion = "0.25.0"
dependencies {
implementation "com.google.api.grpc:proto-google-common-protos:1.17.0",
"io.grpc:grpc-protobuf:${grpcVersion}",
"io.grpc:grpc-stub:${grpcVersion}",
"io.grpc:grpc-netty:${grpcVersion}",
"io.grpc:grpc-services:${grpcVersion}",
"javax.annotation:javax.annotation-api:1.3.2",
"org.apache.logging.log4j:log4j-core:2.13.0",
"org.apache.logging.log4j:log4j-api:2.13.0",
"io.opencensus:opencensus-exporter-trace-logging:${opencensusVersion}"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
ofSourceSet('main')
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'hipstershop'
srcDirs 'build/generated/source/proto/main/java/hipstershop'
srcDirs 'build/generated/source/proto/main/grpc/hipstershop'
}
}
}
startScripts.enabled = false
task commentService(type: CreateStartScripts) {
mainClassName = 'hipstershop.CommentService'
applicationName = 'commentservice'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}
applicationDistribution.into('bin') {
from(commentService)
fileMode = 0755
}