plugins {
    id "com.android.application"
    id "com.google.protobuf"
}

description = 'gRPC: Android Integration Testing'

repositories {
    google()
    mavenCentral()
}

android {
    namespace 'io.grpc.android.integrationtest'
    sourceSets {
        main {
            java {
                srcDirs += "${projectDir}/../interop-testing/src/main/java/"
                setIncludes(["io/grpc/android/integrationtest/**",
                             "io/grpc/testing/integration/AbstractInteropTest.java",
                             "io/grpc/testing/integration/TestServiceImpl.java",
                             "io/grpc/testing/integration/Util.java"])
            }
            proto {
                srcDirs += "${projectDir}/../interop-testing/src/main/proto/"
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    compileSdkVersion 33

    defaultConfig {
        applicationId "io.grpc.android.integrationtest"
        minSdkVersion 19
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        debug { minifyEnabled false }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable 'InvalidPackage', 'HardcodedText', 'UsingOnClickInXml',
                'MissingClass' // https://github.com/grpc/grpc-java/issues/8799
    }
    packagingOptions {
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/io.netty.versions.properties'
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation libraries.androidx.annotation
    implementation 'com.google.android.gms:play-services-base:18.0.1'

    implementation project(':grpc-android'),
            project(':grpc-auth'),
            project(':grpc-census'),
            project(':grpc-okhttp'),
            project(':grpc-protobuf-lite'),
            project(':grpc-stub'),
            project(':grpc-testing'),
            libraries.hdrhistogram,
            libraries.junit,
            libraries.truth,
            libraries.androidx.test.rules,
            libraries.opencensus.contrib.grpc.metrics

    implementation (libraries.google.auth.oauth2Http) {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation (project(':grpc-services')) {
        exclude group: 'com.google.protobuf'
        exclude group: 'com.google.guava'
    }

    compileOnly libraries.javax.annotation

    androidTestImplementation project(':grpc-netty'),
            'androidx.test.ext:junit:1.1.3',
            'androidx.test:runner:1.4.0'
}

// Checkstyle doesn't run automatically with android
task checkStyleMain(type: Checkstyle) {
    source 'src/main/java'
    include '**/*.java'
    classpath = files()
}

task checkStyleTest(type: Checkstyle) {
    source 'src/androidTest/java'
    include '**/*.java'
    classpath = files()
}

project.tasks['check'].dependsOn checkStyleMain, checkStyleTest

import net.ltgt.gradle.errorprone.CheckSeverity

tasks.withType(JavaCompile).configureEach {
    options.compilerArgs += [
            "-Xlint:-cast"
    ]
    appendToProperty(it.options.errorprone.excludedPaths, ".*/R.java", "|")
    appendToProperty(
            it.options.errorprone.excludedPaths,
            ".*/src/generated/.*",
            "|")
}

configureProtoCompilation()
