| apply plugin: 'com.android.application' | |
| apply plugin: 'com.google.protobuf' | |
| android { | |
| compileSdkVersion 26 | |
| defaultConfig { | |
| applicationId "io.grpc.android.integrationtest" | |
| // API level 14+ is required for TLS since Google Play Services v10.2 | |
| minSdkVersion 14 | |
| targetSdkVersion 26 | |
| versionCode 1 | |
| versionName "1.0" | |
| testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
| } | |
| buildTypes { | |
| debug { | |
| minifyEnabled false | |
| } | |
| release { | |
| minifyEnabled true | |
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
| } | |
| } | |
| lintOptions { | |
| disable 'InvalidPackage', 'HardcodedText' | |
| } | |
| } | |
| protobuf { | |
| protoc { | |
| artifact = 'com.google.protobuf:protoc:3.5.1-1' | |
| } | |
| plugins { | |
| grpc { | |
| artifact = 'io.grpc:protoc-gen-grpc-java:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION | |
| } | |
| } | |
| generateProtoTasks { | |
| all().each { task -> | |
| task.builtins { | |
| javanano { | |
| // Options added to --javanano_out | |
| option 'ignore_services=true' | |
| option 'enum_style=java' | |
| } | |
| } | |
| task.plugins { | |
| grpc { | |
| // Options added to --grpc_out | |
| option 'nano' | |
| } | |
| } | |
| } | |
| } | |
| } | |
| dependencies { | |
| compile 'com.android.support:appcompat-v7:26.1.0' | |
| compile 'com.android.support:support-annotations:27.1.1' | |
| compile 'com.google.android.gms:play-services-base:12.0.1' | |
| // You need to build grpc-java to obtain the grpc libraries below. | |
| compile 'io.grpc:grpc-protobuf-nano:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION | |
| compile 'io.grpc:grpc-okhttp:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION | |
| compile 'io.grpc:grpc-stub:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION | |
| compile 'io.grpc:grpc-testing:1.14.0-SNAPSHOT' // CURRENT_GRPC_VERSION | |
| compile 'javax.annotation:javax.annotation-api:1.2' | |
| compile 'junit:junit:4.12' | |
| androidTestCompile 'com.android.support.test:rules:1.0.1' | |
| androidTestCompile 'com.android.support.test:runner:1.0.1' | |
| } | |
| gradle.projectsEvaluated { | |
| tasks.withType(JavaCompile) { | |
| options.compilerArgs << "-Xlint:deprecation" | |
| } | |
| } |