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

plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    id("io.objectbox")
    id("com.google.gms.google-services")
    id("com.google.firebase.crashlytics")
}
val timeStamp: String = SimpleDateFormat("MM_dd_HH_mm").format(Date())
android {
    namespace = "com.apps.chillscreen"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.apps.chillscreen"
        minSdk = 24
        targetSdk = 35
        versionCode = 2
        versionName = "1.1"
        setProperty(
            "archivesBaseName",
            "Chill Screen_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_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = "11"
    }
    buildFeatures {
        viewBinding = true
    }
}

dependencies {

    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.lifecycle.runtime.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.activity)
    implementation(libs.androidx.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.junit)
    implementation(libs.androidx.appcompat.v161)
    implementation(libs.material.v190)
    androidTestImplementation(libs.androidx.espresso.core)
    implementation(libs.glide)
    implementation(libs.objectbox.android)
    annotationProcessor(libs.objectbox.processor)
    implementation(libs.okhttp)

    implementation(files("libs/TopOnLibrary_06_27_16_00-release.aar"))
    implementation(files("libs/UpLoadLibrary_07_03_11_54-release.aar"))


    implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
    implementation("com.google.firebase:firebase-crashlytics")
    implementation("com.google.firebase:firebase-analytics")
    implementation("com.google.firebase:firebase-config")

    //-----------------------------------------------TopOn(Mintegral、Pangle、UnitAds、Digital Turbine(Fyber)、Chartboost&Helium、Ironsource、Liftoff(Vungle)、Inmobi、Start.io、Bigo)
    //TU (Necessary)
    implementation("com.thinkup.sdk:core-tpn:6.4.90")
    implementation("com.thinkup.sdk:nativead-tpn:6.4.90")
    implementation("com.thinkup.sdk:banner-tpn:6.4.90")
    implementation("com.thinkup.sdk:interstitial-tpn:6.4.90")
    implementation("com.thinkup.sdk:rewardedvideo-tpn:6.4.90")
    implementation("com.thinkup.sdk:splash-tpn:6.4.90")

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

    //StartApp
    implementation("com.thinkup.sdk:adapter-tpn-startapp:6.4.90")
    implementation("com.startapp:inapp-sdk:5.0.2")

    //Vungle
    implementation("com.thinkup.sdk:adapter-tpn-vungle:6.4.90")
    implementation("com.vungle:vungle-ads:7.5.0")
    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.thinkup.sdk:adapter-tpn-unityads:6.4.90")
    implementation("com.unity3d.ads:unity-ads:4.14.0")

    //Ironsource
    implementation("com.thinkup.sdk:adapter-tpn-ironsource:6.4.90")
    implementation("com.ironsource.sdk:mediationsdk:8.7.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.thinkup.sdk:adapter-tpn-bigo:6.4.90")
    implementation("com.bigossp:bigo-ads:5.3.0")

    //Pangle
    implementation("com.thinkup.sdk:adapter-tpn-pangle:6.4.90.1")
    implementation("com.pangle.global:pag-sdk:7.2.0.6")
    implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")

    //Inmobi
    implementation("com.thinkup.sdk:adapter-tpn-inmobi:6.4.90")
    implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.2")

    //Mintegral
    implementation("com.thinkup.sdk:adapter-tpn-mintegral:6.4.90")
    implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71")
    implementation("androidx.recyclerview:recyclerview:1.1.0")

    //Chartboost
    implementation("com.thinkup.sdk:adapter-tpn-chartboost:6.4.90")
    implementation("com.chartboost:chartboost-sdk:9.8.3")
    implementation("com.chartboost:chartboost-mediation-sdk:4.9.2")
    implementation("com.chartboost:chartboost-mediation-adapter-chartboost:4.9.8.1.0")
    implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0")
    implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
    implementation("com.squareup.okhttp3:okhttp:4.10.0")
    implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
    implementation("com.squareup.retrofit2:retrofit:2.9.0")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")

    //Fyber
    implementation("com.thinkup.sdk:adapter-tpn-fyber:6.4.90")
    implementation("com.fyber:marketplace-sdk:8.3.7")
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")

    //Tramini
    implementation("com.thinkup.sdk:tramini-plugin-tpn:6.4.90")

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

    //----------------------------------------------TopOn
}