/*
 * Copyright 2021 Google LLC
 *
 * 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.
 */
plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    namespace "com.google.ar.core.examples.kotlin.ml"
    compileSdkVersion 36

    defaultConfig {
        applicationId "com.google.ar.core.examples.kotlin.ml"
        minSdkVersion 24
        targetSdkVersion 36
        versionCode 1
        versionName '1.0'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/INDEX.LIST'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.4.2'

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'

    implementation 'com.google.android.material:material:1.3.0'

    // Google Cloud Vision API via REST.
    implementation 'com.google.code.gson:gson:2.8.8'
    implementation 'com.squareup.okhttp3:okhttp:4.10.0'

    // MLKit
    implementation 'com.google.mlkit:object-detection:16.2.3'
    implementation 'com.google.mlkit:object-detection-custom:16.3.1'

    // ARCore (Google Play Services for AR) library.
    implementation 'com.google.ar:core:1.50.0'

    // Obj - a simple Wavefront OBJ file loader
    // https://github.com/javagl/Obj
    implementation 'de.javagl:obj:0.2.1'
}
