/*
 * Copyright (C) 2019 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.
 */

apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    defaultConfig {
        applicationId "com.android.car.ui.paintbooth"
        minSdkVersion 28
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    sourceSets {
        main {
            java {
                filter.excludes = [
                        "com/android/car/ui/paintbooth/overlays/OverlayManagerImpl.java",
                        "com/android/car/ui/paintbooth/currentactivity/ActivityTaskManagerImpl.java",
                ]
            }
        }
    }

    // This is the gradle equivalent of the libs: ["android.car"] in the Android.bp
    useLibrary 'android.car'
}

dependencies {
    implementation project(':car-ui-lib')
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0'
    api 'androidx.annotation:annotation:1.2.0'
    api 'androidx.constraintlayout:constraintlayout:2.0.4'
    api 'androidx.recyclerview:recyclerview:1.2.0'
}
