blob: 9de66fd1984592b8078ffbc8bb68a835abbfaa0c [file] [log] [blame]
Xudong Maf88779e2015-06-10 17:36:55 -07001apply plugin: 'com.android.application'
Xudong Ma12d57972015-07-06 11:05:26 -07002apply plugin: 'com.google.protobuf'
Xudong Maf88779e2015-06-10 17:36:55 -07003
4android {
5 compileSdkVersion 22
6 buildToolsVersion '22.0.1'
7
8 defaultConfig {
9 applicationId "io.grpc.android.integrationtest"
Xudong Maa0241d82015-06-30 15:18:14 -070010 minSdkVersion 9
Xudong Maf88779e2015-06-10 17:36:55 -070011 targetSdkVersion 22
12 versionCode 1
13 versionName "1.0"
14 }
15 buildTypes {
Xudong Ma512134b2015-08-04 10:44:12 -070016 debug {
Xudong Mad238d862015-12-14 13:11:59 -080017 minifyEnabled false
Xudong Maf88779e2015-06-10 17:36:55 -070018 }
Xudong Ma512134b2015-08-04 10:44:12 -070019 release {
20 minifyEnabled true
21 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 }
23 }
24 lintOptions {
25 disable 'InvalidPackage', 'HardcodedText'
Xudong Maf88779e2015-06-10 17:36:55 -070026 }
27}
28
Xudong Ma12d57972015-07-06 11:05:26 -070029protobuf {
30 protoc {
Eric Andersonc38611a2016-10-24 14:59:24 -070031 artifact = 'com.google.protobuf:protoc:3.1.0'
Xudong Ma12d57972015-07-06 11:05:26 -070032 }
33 plugins {
34 grpc {
Eric Andersone9643bb2016-07-11 16:57:58 -070035 artifact = 'io.grpc:protoc-gen-grpc-java:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION
Xudong Ma12d57972015-07-06 11:05:26 -070036 }
37 }
38 generateProtoTasks {
39 all().each { task ->
40 task.builtins {
41 javanano {
42 // Options added to --javanano_out
43 option 'ignore_services=true'
44 }
45 }
46
47 task.plugins {
48 grpc {
49 // Options added to --grpc_out
Eric Anderson0a01b3c2016-03-29 16:16:21 -070050 option 'nano'
Xudong Ma12d57972015-07-06 11:05:26 -070051 }
52 }
53 }
54 }
55}
56
Xudong Maf88779e2015-06-10 17:36:55 -070057dependencies {
58 compile 'com.android.support:appcompat-v7:22.1.1'
59 compile 'com.google.android.gms:play-services-base:7.3.0'
60 compile 'com.google.code.findbugs:jsr305:3.0.0'
61 compile 'com.google.guava:guava:18.0'
62 compile 'com.squareup.okhttp:okhttp:2.2.0'
Xudong Maf88779e2015-06-10 17:36:55 -070063 // You need to build grpc-java to obtain these libraries below.
Eric Andersone9643bb2016-07-11 16:57:58 -070064 compile 'io.grpc:grpc-protobuf-nano:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION
65 compile 'io.grpc:grpc-okhttp:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION
66 compile 'io.grpc:grpc-stub:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION
67 compile 'io.grpc:grpc-testing:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION
Xudong Ma12d57972015-07-06 11:05:26 -070068 compile 'javax.annotation:javax.annotation-api:1.2'
Louis Ryan540b4d32015-09-04 13:26:24 -070069}
Eric Anderson00996572016-07-15 10:31:13 -070070
71gradle.projectsEvaluated {
72 tasks.withType(JavaCompile) {
73 options.compilerArgs << "-Xlint:deprecation"
74 }
75}