import java.util.Date
import java.text.SimpleDateFormat

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
//    id("com.google.firebase.crashlytics")
//    id("com.google.gms.google-services")
    id("io.objectbox")
}
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
android {
    namespace = "com.ar.drawing.art"
    compileSdk = 34

    defaultConfig {
        //com.ar.drawing.art
        applicationId = "com.ar.drawing.art"
        minSdk = 23
        targetSdk = 34
        versionCode = 1
        versionName = "1.0.0"
        setProperty(
            "archivesBaseName",
            "AR Drawing Art_V" + versionName + "(${versionCode})_$timestamp"
        )
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
//    kotlinOptions {
//        jvmTarget = "1.8"
//    }
    buildFeatures {
        viewBinding = true
    }
}

dependencies {

    implementation("androidx.appcompat:appcompat:1.7.0")
    implementation("com.google.android.material:material:1.12.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
//    implementation("com.google.android.gms:play-services-location:21.3.0")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

    val camerax_version = "1.1.0-beta01"
    //noinspection GradleDependency
    implementation("androidx.camera:camera-core:${camerax_version}")
    //noinspection GradleDependency
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    //noinspection GradleDependency
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    //noinspection GradleDependency
//    implementation("androidx.camera:camera-video:${camerax_version}")
    //noinspection GradleDependency
    implementation("androidx.camera:camera-view:${camerax_version}")
    //noinspection GradleDependency
    implementation("androidx.camera:camera-extensions:${camerax_version}")

    implementation ("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
    implementation("com.google.android.gms:play-services-appset:16.0.1")
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
}