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")
}
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
android {
    namespace = "com.key.coolkeyboard"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.key.coolkeyboard.test"
        minSdk = 23
        targetSdk = 34
        versionCode = 4
        versionName = "1.0.3"
        setProperty(
            "archivesBaseName",
            "coolkeyboard_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
    }
    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")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.2.1")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.6.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("androidx.room:room-ktx:$room_version")
    implementation("androidx.room:room-rxjava2:$room_version")
    implementation("androidx.room:room-rxjava3:$room_version")
    implementation("androidx.room:room-guava:$room_version")
    testImplementation("androidx.room:room-testing:$room_version")
    implementation("androidx.room:room-paging:$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")
    implementation("com.google.firebase:firebase-config")

    //-----------------------------------------------TopOn(pangle、IronSource、mintegral、unityads、liftoff(vungle)、Bigo)
    //Anythink (Necessary)
    implementation("com.anythink.sdk:core-tpn:6.3.68")
    implementation("com.anythink.sdk:nativead-tpn:6.3.68")
    implementation("com.anythink.sdk:banner-tpn:6.3.68")
    implementation("com.anythink.sdk:interstitial-tpn:6.3.68")
    implementation("com.anythink.sdk:rewardedvideo-tpn:6.3.68")
    implementation("com.anythink.sdk:splash-tpn:6.3.68")

    //Androidx (Necessary)
    implementation("androidx.appcompat:appcompat:1.1.0")
    implementation("androidx.browser:browser:1.4.0")

    //Vungle
    implementation("com.anythink.sdk:adapter-tpn-vungle:6.3.68")
    implementation("com.vungle:vungle-ads:7.3.2")
    implementation("com.google.android.gms:play-services-basement:18.1.0")
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")

    //UnityAds
    implementation("com.anythink.sdk:adapter-tpn-unityads:6.3.68")
    implementation("com.unity3d.ads:unity-ads:4.9.3")

    //Ironsource
    implementation("com.anythink.sdk:adapter-tpn-ironsource:6.3.68")
    implementation("com.ironsource.sdk:mediationsdk:8.1.0")
    implementation("com.google.android.gms:play-services-appset:16.0.2")
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
    implementation("com.google.android.gms:play-services-basement:18.1.0")

    //Bigo
    implementation("com.anythink.sdk:adapter-tpn-bigo:6.3.68")
    implementation("com.bigossp:bigo-ads:4.7.4")

    //Pangle
    implementation("com.anythink.sdk:adapter-tpn-pangle-nonchina:6.3.68.1")
    implementation("com.pangle.global:ads-sdk:6.0.0.3")
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")

    //Mintegral
    implementation("com.anythink.sdk:adapter-tpn-mintegral-nonchina:6.3.68")
    implementation("com.mbridge.msdk.oversea:reward:16.7.51")
    implementation("com.mbridge.msdk.oversea:newinterstitial:16.7.51")
    implementation("com.mbridge.msdk.oversea:mbnative:16.7.51")
    implementation("com.mbridge.msdk.oversea:mbnativeadvanced:16.7.51")
    implementation("com.mbridge.msdk.oversea:mbsplash:16.7.51")
    implementation("com.mbridge.msdk.oversea:mbbanner:16.7.51")
    implementation("com.mbridge.msdk.oversea:mbbid:16.7.51")
    implementation("androidx.recyclerview:recyclerview:1.1.0")

    //Tramini
//    implementation("com.anythink.sdk:tramini-plugin-tpn:6.3.68")

    // Debugger UI Tools
//    implementation ("com.anythink.sdk:debugger-ui:1.0.7")

    //----------------------------------------------TopOn

}