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

plugins {
    alias(libs.plugins.android.application)
    id("com.google.gms.google-services")
    id("com.google.firebase.crashlytics")
}
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())

android {
    namespace = "com.wall.exquisite.wallpaper"
    compileSdk = 36

    defaultConfig {
        applicationId = "com.wall.exquisite.wallpaper"
        minSdk = 24
        targetSdk = 36
        versionCode = 2
        versionName = "2.0"
        setProperty("archivesBaseName","Wallpaper Exquisite_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
    }

    buildFeatures {
//        viewBinding = true
        dataBinding=true
    }
}

dependencies {
    implementation(libs.appcompat)
    implementation(libs.material)
    implementation("androidx.activity:activity:1.10.0")
    implementation(libs.constraintlayout)
    testImplementation(libs.junit)
    androidTestImplementation(libs.ext.junit)
    androidTestImplementation(libs.espresso.core)

    // 图片加载库
    implementation("com.github.bumptech.glide:glide:4.16.0")
    annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")

    // JSON解析
    implementation("com.google.code.gson:gson:2.10.1")

    // 其他UI组件
    implementation("androidx.viewpager2:viewpager2:1.0.0")
    implementation("androidx.recyclerview:recyclerview:1.3.2")
    // 图片缩放库（必加，否则无法缩放大图）
    implementation("com.github.chrisbanes:PhotoView:2.3.0")


    implementation("androidx.core:core-ktx:1.12.0")
    implementation("androidx.appcompat:appcompat:1.6.1")

    // 新增：Glide Transform扩展（用于圆角变换）
    implementation ("jp.wasabeef:glide-transformations:4.3.0")

    implementation ("androidx.constraintlayout:constraintlayout:2.1.4")

    implementation(files("libs/TradPlusLibrary_11_25_15_02-release.aar"))
    implementation(files("libs/UpLoadLibrary_12_03_15_13-release.aar"))
    implementation ("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

    implementation ("com.google.android.gms:play-services-ads-identifier:18.0.1")

    // TradPlus
    implementation("com.tradplusad:tradplus:14.5.0.1")
    //noinspection GradleCompatible
    implementation("androidx.legacy:legacy-support-v4:1.0.0")
    implementation("androidx.appcompat:appcompat:1.3.0-alpha02")
    // Meta
    implementation("com.facebook.android:audience-network-sdk:6.20.0")
    implementation("com.tradplusad:tradplus-facebook:1.14.5.0.1")
    // Applovin
    implementation("com.applovin:applovin-sdk:13.3.1")
    implementation("com.tradplusad:tradplus-applovin:9.14.5.0.1")
    implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")
    // Ironsource
    implementation("com.ironsource.sdk:mediationsdk:8.10.0")
    implementation("com.tradplusad:tradplus-ironsource:10.14.5.0.1")
    implementation("com.google.android.gms:play-services-appset:16.0.0")
    implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
    implementation("com.google.android.gms:play-services-basement:17.5.0")
    // Adcolony
    implementation("com.adcolony:sdk:4.8.0")
    implementation("com.tradplusad:tradplus-adcolony:4.14.5.0.1")
    implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
    // Pangle
    implementation("com.tradplusad:tradplus-pangle:19.14.5.0.1")
    implementation("com.pangle.global:pag-sdk:7.3.0.3")
    // UnityAds
    implementation("com.tradplusad:tradplus-unity:5.14.5.0.1")
    implementation("com.unity3d.ads:unity-ads:4.15.1")
    // Chartboost
    implementation("com.tradplusad:tradplus-chartboostx:15.14.5.0.1")
    implementation("com.chartboost:chartboost-sdk:9.8.3")
    implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
    implementation("com.google.android.gms:play-services-base:17.4.0")
    // Inmobi
    implementation("com.tradplusad:tradplus-inmobix:23.14.5.0.1")
    implementation("com.inmobi.monetization:inmobi-ads-kotlin:10.8.3")
    implementation("androidx.core:core-ktx:1.5.0")
    implementation("com.inmobi.omsdk:inmobi-omsdk:1.5.2.0")
    // Fyber
    implementation("com.fyber:marketplace-sdk:8.3.7")
    implementation("com.tradplusad:tradplus-fyber:24.14.5.0.1")
    implementation("com.google.android.gms:play-services-ads-identifier:17.0.0")
    implementation("com.google.android.gms:play-services-base:17.4.0")
    // Start.io
    implementation("com.startapp:inapp-sdk:5.2.3")
    implementation("com.tradplusad:tradplus-startapp:28.14.5.0.1")
    // Mintegral
    implementation("com.tradplusad:tradplus-mintegralx_overseas:18.14.5.0.1")
    implementation("androidx.recyclerview:recyclerview:1.1.0")
    implementation("com.mbridge.msdk.oversea:mbridge_android_sdk:16.9.71")
    // Liftoff
    implementation("com.tradplusad:tradplus-vunglex:7.14.5.0.1")
    implementation("com.vungle:vungle-ads:7.5.0")
    // Yandex
    implementation("com.yandex.android:mobileads:7.13.0") {
        exclude(group = "com.caverock", module = "androidsvg-aar")
    }
    implementation("com.tradplusad:tradplus-yandex:50.14.6.10.1")
    // Bigo
    implementation("com.bigossp:bigo-ads:5.4.0")
    implementation("com.tradplusad:tradplus-bigo:57.14.5.0.1")
    // Cross Promotion
    implementation("com.tradplusad:tradplus-crosspromotion:27.14.5.0.1")
    // TP Exchange
    // 请注意保持与主包版本同步更新
    implementation("com.google.code.gson:gson:2.8.6")
    implementation("com.tradplusad:tp_exchange:40.14.5.0.1")

    // Google UMP
    implementation ("com.google.android.ump:user-messaging-platform:3.2.0")

    // TradPlus Tools
    // implementation 'com.tradplusad:tradplus-tool:1.1.4'

    //firebase
    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")
}