blob: 8bc8ccc451b6a832866d6a50249bd1ef7ca85167 [file] [log] [blame]
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
android {
compileSdkVersion 22
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "io.grpc.android.integrationtest"
// API level 14+ is required for TLS since Google Play Services v10.2
minSdkVersion 14
targetSdkVersion 22
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.12.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:22.2.1'
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.google.android.gms:play-services-base:7.3.0'
// You need to build grpc-java to obtain the grpc libraries below.
compile 'io.grpc:grpc-protobuf-nano:1.12.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'io.grpc:grpc-okhttp:1.12.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'io.grpc:grpc-stub:1.12.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'io.grpc:grpc-testing:1.12.0-SNAPSHOT' // CURRENT_GRPC_VERSION
compile 'javax.annotation:javax.annotation-api:1.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test:runner:0.5'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}