apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 30
    defaultConfig {
        applicationId "com.ttv.ocrdemo"
        minSdkVersion 24
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true

        ndk {
            abiFilters 'arm64-v8a'
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

androidExtensions {
    experimental = true
}

dependencies {
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.google.android.material:material:1.2.1'
    implementation "android.arch.lifecycle:extensions:1.1.1"
    implementation "androidx.annotation:annotation:1.1.0"
    implementation "androidx.core:core-ktx:1.3.2"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21"

    // Object feature and model
    implementation 'com.google.mlkit:object-detection:16.2.3'
    // Custom model
    implementation 'com.google.mlkit:object-detection-custom:16.3.1'

    implementation("com.android.volley:volley:1.1.1")

    implementation files('libs/ttvocr.aar')

    def camerax_version = "1.0.0-alpha05"
    implementation "androidx.camera:camera-core:$camerax_version"
    implementation "androidx.camera:camera-camera2:$camerax_version"

    api 'com.google.guava:guava:30.1-jre'
}
