/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * 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
 *
 *      http://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.
 */

// Targets for the Audio Test Harness Client Libraries.
// Clients can be used host or device side to communicate with an Audio
// Test Harness Server.
// LIBRARIES ==============================================================

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

java_library {
    name: "audiotestharness-client-clientlib",
    host_supported: true,
    srcs: [
        "src/main/java/com/android/media/audiotestharness/client/*.java",
    ],
    sdk_version: "current",
}

java_library {
    name: "audiotestharness-client-corelib",
    host_supported: true,
    srcs: [
        "src/main/java/com/android/media/audiotestharness/client/core/*.java",
    ],
    static_libs: [
        "audiotestharness-commonlib-lite",
        "audiotestharness-commonprotolib-lite",
    ],
    sdk_version: "current",
}

java_library {
    name: "audiotestharness-client-grpclib",
    host_supported: true,
    srcs: [
        "src/main/java/com/android/media/audiotestharness/client/grpc/*.java",
    ],
    static_libs: [
        "audiotestharness-client-corelib",
        "grpc-java-okhttp-client-lite",
        "audiotestharness-servicegrpclib-lite",
        "guava",
    ],
    sdk_version: "current",
}

// TESTS ==============================================================

java_test {
    name: "audiotestharness-client-grpclib-tests",
    test_suites: ["general-tests"],
    host_supported: true,
    srcs: [
        "src/test/java/com/android/media/audiotestharness/client/grpc/*.java",
    ],
    static_libs: [
        "audiotestharness-client-grpclib",
        "grpc-java-core-inprocess",
        "junit",
        "junit-params",
        "mockito",
        "objenesis",
    ],
    sdk_version: "current",
    test_options: {
        unit_test: true,
    },
}