-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathbuild.gradle
72 lines (63 loc) · 1.89 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
apply plugin: 'application'
apply plugin: 'com.google.protobuf'
buildscript {
dependencies {
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.3"
}
}
def grpcVersion = '1.7.0' // CURRENT_GRPC_VERSION
dependencies {
implementation project(':demo:common')
implementation 'com.google.capillary:lib:1.0.0'
implementation 'com.google.crypto.tink:tink:1.1.0'
implementation 'com.google.protobuf:protobuf-java:3.4.0'
implementation "io.grpc:grpc-netty:${grpcVersion}"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation 'io.netty:netty-tcnative-boringssl-static:2.0.6.Final'
implementation 'com.google.api-client:google-api-client:1.23.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.guava:guava:23.4-jre'
implementation 'commons-cli:commons-cli:1.4'
implementation 'org.xerial:sqlite-jdbc:3.21.0.1'
}
sourceSets {
main {
proto {
srcDir project(':demo:common').projectDir.toString() + '/proto'
}
}
}
mainClassName = 'com.google.capillary.demo.server.DemoServer'
run {
if (project.hasProperty("runArgs")) {
args(runArgs.split(','))
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.4.0'
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
grpc {
option 'enable_deprecated=false'
}
}
}
}
}
// Inform IntelliJ projects about the generated code.
apply plugin: 'idea'
idea {
module {
sourceDirs += file("${projectDir}/build/generated/source/proto/main/grpc")
sourceDirs += file("${projectDir}/build/generated/source/proto/main/java")
}
}