plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.jetbrains.kotlin.android)
    // Make sure that you have the Google services Gradle plugin
    id("com.google.gms.google-services")
    // Add the Crashlytics Gradle plugin
    id("com.google.firebase.crashlytics")
}

android {
    namespace = "com.assimilate.alltrans"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.assimilate.alltrans"
        minSdk = 23
        targetSdk = 34
        // 该打  6
        versionCode = 5
        versionName = "1.0.5"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildFeatures {
        buildConfig = true
        viewBinding = true
        buildConfig = true
    }

    buildTypes {

//        debug {
//            isShrinkResources = true
//            isMinifyEnabled = true
//            proguardFiles(
//                getDefaultProguardFile("proguard-android-optimize.txt"),
//                "proguard-rules.pro"
//            )
//        }

        release {
            isShrinkResources = true
            isMinifyEnabled = 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"
    }
}

dependencies {

    implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar"))))

    //google ads
    implementation("com.google.android.gms:play-services-ads:23.1.0")
    implementation("com.google.ads.mediation:adcolony:4.8.0.2")
    implementation("com.google.ads.mediation:applovin:12.5.0.0")
    implementation("com.google.ads.mediation:vungle:6.12.0.0")
    implementation("com.google.ads.mediation:facebook:6.17.0.0")
    implementation("com.google.ads.mediation:mintegral:16.7.51.0")
    implementation("com.google.ads.mediation:pangle:6.0.0.5.0")
    implementation("com.unity3d.ads:unity-ads:4.6.1")
    implementation("com.google.ads.mediation:unity:4.12.0.0")
    // implementation("com.google.ads.mediation:ironsource:8.1.0.0")

    // Import the BoM for the Firebase platform
    implementation(platform("com.google.firebase:firebase-bom:33.1.1"))
    implementation("com.google.firebase:firebase-crashlytics")
    implementation("com.google.firebase:firebase-analytics")
    implementation("com.google.firebase:firebase-config")

    // To recognize Latin script
    implementation("com.google.mlkit:text-recognition:16.0.0")
    // To recognize Chinese script
    implementation("com.google.mlkit:text-recognition-chinese:16.0.0")
    // To recognize Devanagari script
    implementation("com.google.mlkit:text-recognition-devanagari:16.0.0")
    // To recognize Japanese script
    implementation("com.google.mlkit:text-recognition-japanese:16.0.0")
    // To recognize Korean script
    implementation("com.google.mlkit:text-recognition-korean:16.0.0")
    // 文本识别
    implementation("com.google.mlkit:language-id:17.0.5")

    // CameraX core library
    implementation(libs.androidx.camera.core)
    // CameraX Camera2 extensions
    implementation(libs.androidx.camera.camera2)
    // CameraX Lifecycle library
    implementation(libs.androidx.camera.lifecycle)
    // CameraX View class
    implementation(libs.androidx.camera.view)


    // other
    implementation(libs.guava)
    implementation(libs.retrofit)
    implementation(libs.converter.gson)
    implementation(libs.gson)
    implementation(libs.lottie)
    implementation(libs.glide)


    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.activity)
    implementation(libs.androidx.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.junit)
    androidTestImplementation(libs.androidx.espresso.core)
}