/*
 * Copyright 2021 TripodWorks
 *
 * 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.
 */
ext.postBuildExtras = {
    allprojects {
    }
    android {
        repositories {
            // Depending on AndroidX Snapshot Builds to get the latest CameraX libs.
            maven { url 'https://androidx.dev/snapshots/builds/6787662/artifacts/repository/' }
        }

        dependencies {

            implementation 'androidx.multidex:multidex:2.0.1'
            implementation 'com.google.code.gson:gson:2.8.5'
            implementation 'com.google.guava:guava:27.1-android'

            // Face features
            implementation 'com.google.mlkit:face-detection:16.0.7'

            // ViewModel and LiveData
            implementation "androidx.lifecycle:lifecycle-livedata:2.2.0"
            implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
            implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

            implementation 'androidx.appcompat:appcompat:1.2.0'
            implementation 'androidx.annotation:annotation:1.1.0'

            // CameraX
            implementation "androidx.camera:camera-camera2:1.0.0-SNAPSHOT"
            implementation "androidx.camera:camera-lifecycle:1.0.0-SNAPSHOT"
            implementation "androidx.camera:camera-view:1.0.0-SNAPSHOT"
        }

        configurations {
            // Resolves dependency conflict caused by some dependencies use
            // com.google.guava:guava and com.google.guava:listenablefuture together.
            all*.exclude group: 'com.google.guava', module: 'listenablefuture'
        }
    }
    configurations.all {
    }
}
