/*
 * Copyright 2021 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.
 */
import androidx.build.LibraryType

plugins {
    id("AndroidXPlugin")
    id("com.android.library")
}

dependencies {
    api(libs.jspecify)
    api("androidx.annotation:annotation:1.1.0")

    implementation(project(":appsearch:appsearch"))
    implementation(project(":appsearch:appsearch-local-storage"))
    implementation("androidx.collection:collection:1.4.2")
    implementation(libs.truth)

    androidTestImplementation(libs.testCore)
    androidTestImplementation(libs.testRules)
    androidTestImplementation(libs.truth)
    androidTestImplementation(libs.junit)
}

androidx {
    name = 'AppSearch Test Util'
    type = LibraryType.INTERNAL_TEST_LIBRARY
    inceptionYear = '2021'
    description = 'Test Utilities to be used by any test module for AppSearch'
}

android {
    compileSdk = 35
    namespace = "androidx.appsearch.testutil"
}
