-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
53 lines (43 loc) · 1.07 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
plugins {
id 'java'
id 'com.google.protobuf' version '0.8.10'
}
def protobufVersion = '3.6.1'
def grpcVersion = '1.23.0'
group 'MessengerServer'
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
// generatedFilesBaseDir = "$projectDir/src/generated"
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation("io.grpc:grpc-stub:${grpcVersion}")
implementation("io.grpc:grpc-core:${grpcVersion}")
implementation("io.grpc:grpc-protobuf:${grpcVersion}")
implementation("io.grpc:grpc-netty:${grpcVersion}")
implementation 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
}