plugins {
    id "java-library"
    id "maven-publish"

    id "com.google.protobuf"
    id "ru.vyarus.animalsniffer"
}

description = "gRPC: Observability"
dependencies {
    def cloudLoggingVersion = '3.6.1'

    api project(':grpc-api'),
            project(':grpc-alts')

    implementation project(':grpc-protobuf'),
            project(':grpc-stub'),
            libraries.protobuf_util, // Prefer our newer version
            libraries.gson, // Prefer our newer version
            ('com.google.guava:guava:31.0.1-jre'),
            ('com.google.errorprone:error_prone_annotations:2.11.0'),
            ('com.google.auth:google-auth-library-credentials:1.4.0'),
            ('org.checkerframework:checker-qual:3.20.0'),
            ('com.google.auto.value:auto-value-annotations:1.9'),
            ('com.google.http-client:google-http-client:1.41.0'),
            ('com.google.http-client:google-http-client-gson:1.41.0'),
            ('com.google.api.grpc:proto-google-common-protos:2.7.1'),
            ("com.google.cloud:google-cloud-logging:${cloudLoggingVersion}")

    testImplementation project(':grpc-testing'),
            project(':grpc-testing-proto'),
            project(':grpc-netty-shaded')
    testImplementation (libraries.guava_testlib) {
        exclude group: 'junit', module: 'junit'
    }

    signature "org.codehaus.mojo.signature:java18:1.0@signature"
}

configureProtoCompilation()

[publishMavenPublicationToMavenRepository]*.onlyIf { false }
