blob: 9397056449cce9877878604f7e66e75249df8110 (
plain)
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
|
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "io.grpc.routeguideexample"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
disable 'InvalidPackage'
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.3.0'
}
plugins {
javalite {
artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
}
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.7.0-SNAPSHOT' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
javalite {}
grpc {
// Options added to --grpc_out
option 'lite'
}
}
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.+'
// You need to build grpc-java to obtain these libraries below.
compile 'io.grpc:grpc-okhttp:1.7.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'io.grpc:grpc-protobuf-lite:1.7.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'io.grpc:grpc-stub:1.7.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'javax.annotation:javax.annotation-api:1.2'
}
|