import java.util.Date
import java.text.SimpleDateFormat
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id ("kotlin-kapt")
    id("com.google.gms.google-services")
    id("com.google.firebase.crashlytics")
    id("applovin-quality-service")
}
applovin{
    apiKey = "yatmRma9RKlsVe1if4NVbCKUizbmnIgxrtP84RJ2FMcQ5IfcZmuauBmU10zf9CTTaOJrzeIoGCmgT7uTlyigFN"
}

val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
android {
    namespace = "com.key.simplekeyboard"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.key.simplekeyboard"
        minSdk = 23
        targetSdk = 34
        versionCode = 3
        versionName = "1.0.2"
        setProperty("archivesBaseName", "simplekeyboard_V" + versionName + "(${versionCode})_$timestamp")
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isShrinkResources =true
            isMinifyEnabled = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
}

dependencies {

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

    implementation("com.github.bumptech.glide:glide:4.16.0")
    implementation("com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02")

    val room_version = "2.6.1"
    implementation("androidx.room:room-runtime:$room_version")
    annotationProcessor("androidx.room:room-compiler:$room_version")
    kapt("androidx.room:room-compiler:$room_version")

    implementation ("io.github.youth5201314:banner:2.2.3")

    implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
    implementation("com.google.firebase:firebase-analytics-ktx")
    implementation("com.google.firebase:firebase-crashlytics-ktx")

    //--------------------------MAX（Liftoff Monetize（vungle）、Mintegral、Pangle、Unity Ads、inmobi）
    implementation("com.applovin:applovin-sdk:+")
    implementation("com.applovin.mediation:vungle-adapter:+")
    implementation("com.applovin.mediation:mintegral-adapter:+")
    implementation("com.applovin.mediation:bytedance-adapter:+")
    implementation("com.applovin.mediation:unityads-adapter:+")

    implementation("com.applovin.mediation:inmobi-adapter:+")
    implementation("com.squareup.picasso:picasso:2.71828")
    implementation("androidx.recyclerview:recyclerview:1.1.0")
    //MAX


}