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

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("io.objectbox")
    id("com.google.firebase.crashlytics")
    id("com.google.gms.google-services")
    id("applovin-quality-service")
}
applovin {
    apiKey = "sRf_am6eNsMAZxrSLe3K1GPOtbti7op1q9yz1VfCOdhEFHW1xM34XE_W2knxFET_OtazbIlk2aWU6vmtTJPxkg"
}

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

    defaultConfig {
        //com.prankster.fx
        applicationId = "com.prankster.fx"
        minSdk = 23
        targetSdk = 34
        versionCode = 3
        versionName = "1.0.2"
        setProperty(
            "archivesBaseName",
            "Prankster FX_V" + versionName + "(${versionCode})_$timestamp"
        )
        testInstrumentationRunner = "androidx.sounds.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
    buildFeatures {
        compose = true
        viewBinding = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.4.3"
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
}

dependencies {


    implementation("androidx.appcompat:appcompat:1.6.1")
    implementation("com.google.android.material:material:1.12.0")
    implementation("androidx.constraintlayout:constraintlayout:2.1.4")
    implementation("androidx.legacy:legacy-support-v4:1.0.0")
    implementation("androidx.recyclerview:recyclerview:1.3.2")
    implementation("com.github.bumptech.glide:glide:4.16.0")

    implementation("com.geyifeng.immersionbar:immersionbar:3.2.2")

    implementation(platform("com.google.firebase:firebase-bom:33.7.0"))
    // When using the BoM, you don't specify versions in Firebase library dependencies
    // Add the dependency for the Firebase SDK for Google Analytics
    implementation("com.google.firebase:firebase-analytics")
    implementation("com.google.firebase:firebase-crashlytics")
    implementation("com.google.firebase:firebase-config")

    implementation("com.applovin:applovin-sdk:12.6.1")
    implementation ("com.applovin.mediation:vungle-adapter:7.4.1.2")
    implementation ("com.applovin.mediation:mintegral-adapter:16.8.61.0")
    implementation ("com.applovin.mediation:inmobi-adapter:10.7.8.0")
    implementation ("com.squareup.picasso:picasso:2.71828")
    implementation ("androidx.recyclerview:recyclerview:1.1.0")
    implementation ("com.applovin.mediation:bytedance-adapter:6.3.0.2.0")
    implementation ("com.applovin.mediation:unityads-adapter:4.12.3.1")
}