/*
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * This is the build configuration for the google-ads-annotation-processing
 * subproject.
 */

/** Defines a plugin that sets up a module to build generated stubs code. */
plugins {
    id 'com.google.api-ads.java-conventions'
}

dependencies {
    implementation project(":google-ads-stubs-lib")
    testFixturesImplementation 'org.slf4j:slf4j-api:1.7.25'
    testFixturesImplementation 'com.google.api:gax-grpc::testlib'
    testFixturesImplementation 'org.hamcrest:hamcrest:2.2'
    testFixturesImplementation 'org.mockito:mockito-core:4.11.0'
    testFixturesImplementation 'junit:junit:4.13.1'
}

// Required to expose gax-grpc::testlib.
configurations.testImplementation.extendsFrom(configurations.testFixturesImplementation)
// Required to expose GAX, gRPC etc.
configurations.testFixturesImplementation.extendsFrom(configurations.implementation)

publishing {
    publications {
        maven(MavenPublication) { publication ->
            configurePom(publication,
                    "Google Ads API client library for Java - " + project.name,
                    "Stubs for GAAPI version " + project.name)
        }
    }
}
