plugins {
    id "maven-publish"

    id "com.android.library"
}

description = 'gRPC: Android'

android {
    namespace 'io.grpc.android'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    compileSdkVersion 33
    defaultConfig {
        consumerProguardFiles "proguard-rules.txt"
        minSdkVersion 19
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions { abortOnError true }
    publishing {
        singleVariant('release') {
            withSourcesJar()
            withJavadocJar()
        }
    }
}

repositories {
    google()
    mavenCentral()
}

dependencies {
    api project(':grpc-core')
    implementation libraries.guava
    testImplementation project('::grpc-okhttp')
    testImplementation libraries.androidx.test.core
    testImplementation libraries.junit
    testImplementation (libraries.robolectric) {
        // Unreleased change: https://github.com/robolectric/robolectric/pull/5432
        exclude group: 'com.google.auto.service', module: 'auto-service'
    }
    testImplementation libraries.truth
}

tasks.register("javadocs", Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += files(android.getBootClasspath())
    classpath += files({
        android.libraryVariants.collect { variant ->
            variant.javaCompileProvider.get().classpath
        }
    })
    options {
        // Disable JavaDoc doclint on Java 8.
        if (JavaVersion.current().isJava8Compatible()) {
            addStringOption('Xdoclint:none', '-quiet')
        }
    }
}

tasks.register("javadocJar", Jar) {
    dependsOn javadocs
    archiveClassifier = 'javadoc'
    from javadocs.destinationDir
}

tasks.register("sourcesJar", Jar) {
    archiveClassifier = 'sources'
    from android.sourceSets.main.java.srcDirs
}

publishing {
    publications {
        maven {
            afterEvaluate {
                from components.release
            }
        }
    }
}
