-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
51 lines (44 loc) · 1.21 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
plugins {
id 'com.google.protobuf' version '0.8.8'
id 'java'
}
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
mavenCentral()
mavenLocal()
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
def grpcVersion = '1.26.0' // CURRENT_GRPC_VERSION
def protobufVersion = '3.11.1'
def protocVersion = protobufVersion
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
compileOnly "javax.annotation:javax.annotation-api:1.2"
// examples/advanced need this for JsonFormat
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
}
protobuf {
generatedFilesBaseDir = "$projectDir/src/java"
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins {
grpc {
outputSubDir = ''
}
}
}
}
sourceSets {
main {
proto {
srcDirs 'src/proto'
srcDirs 'vendor'
}
}
}