apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0"

    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.0.2'
    }
    plugins {
        javalite {
            artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
        }
        grpc {
            artifact = 'io.grpc:protoc-gen-grpc-java:1.0.2' // 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.+'
    compile 'com.google.code.findbugs:jsr305:3.0.0'
    compile 'com.google.guava:guava:18.0'
    compile 'com.squareup.okhttp:okhttp:2.2.0'

    // You need to build grpc-java to obtain these libraries below.
    compile 'io.grpc:grpc-okhttp:1.0.2' // CURRENT_GRPC_VERSION
    compile 'io.grpc:grpc-protobuf-lite:1.0.2' // CURRENT_GRPC_VERSION
    compile 'io.grpc:grpc-stub:1.0.2' // CURRENT_GRPC_VERSION
    compile 'javax.annotation:javax.annotation-api:1.2'
}
