Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 1 | apply plugin: 'com.android.application' |
Xudong Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 2 | apply plugin: 'com.google.protobuf' |
Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 3 | |
| 4 | android { |
| 5 | compileSdkVersion 22 |
| 6 | buildToolsVersion '22.0.1' |
| 7 | |
| 8 | defaultConfig { |
| 9 | applicationId "io.grpc.android.integrationtest" |
Xudong Ma | a0241d8 | 2015-06-30 15:18:14 -0700 | [diff] [blame] | 10 | minSdkVersion 9 |
Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 11 | targetSdkVersion 22 |
| 12 | versionCode 1 |
| 13 | versionName "1.0" |
| 14 | } |
| 15 | buildTypes { |
Xudong Ma | 512134b | 2015-08-04 10:44:12 -0700 | [diff] [blame] | 16 | debug { |
Xudong Ma | d238d86 | 2015-12-14 13:11:59 -0800 | [diff] [blame] | 17 | minifyEnabled false |
Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 18 | } |
Xudong Ma | 512134b | 2015-08-04 10:44:12 -0700 | [diff] [blame] | 19 | release { |
| 20 | minifyEnabled true |
| 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 22 | } |
| 23 | } |
| 24 | lintOptions { |
| 25 | disable 'InvalidPackage', 'HardcodedText' |
Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 26 | } |
| 27 | } |
| 28 | |
Xudong Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 29 | protobuf { |
| 30 | protoc { |
Eric Anderson | c38611a | 2016-10-24 14:59:24 -0700 | [diff] [blame^] | 31 | artifact = 'com.google.protobuf:protoc:3.1.0' |
Xudong Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 32 | } |
| 33 | plugins { |
| 34 | grpc { |
Eric Anderson | e9643bb | 2016-07-11 16:57:58 -0700 | [diff] [blame] | 35 | artifact = 'io.grpc:protoc-gen-grpc-java:1.1.0-SNAPSHOT' // CURRENT_GRPC_VERSION |
Xudong Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 36 | } |
| 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 Anderson | 0a01b3c | 2016-03-29 16:16:21 -0700 | [diff] [blame] | 50 | option 'nano' |
Xudong Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
Xudong Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 57 | dependencies { |
| 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 Ma | f88779e | 2015-06-10 17:36:55 -0700 | [diff] [blame] | 63 | // You need to build grpc-java to obtain these libraries below. |
Eric Anderson | e9643bb | 2016-07-11 16:57:58 -0700 | [diff] [blame] | 64 | 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 Ma | 12d5797 | 2015-07-06 11:05:26 -0700 | [diff] [blame] | 68 | compile 'javax.annotation:javax.annotation-api:1.2' |
Louis Ryan | 540b4d3 | 2015-09-04 13:26:24 -0700 | [diff] [blame] | 69 | } |
Eric Anderson | 0099657 | 2016-07-15 10:31:13 -0700 | [diff] [blame] | 70 | |
| 71 | gradle.projectsEvaluated { |
| 72 | tasks.withType(JavaCompile) { |
| 73 | options.compilerArgs << "-Xlint:deprecation" |
| 74 | } |
| 75 | } |