import java.util.Date
import java.text.SimpleDateFormat
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
    id 'kotlin-kapt'
    id 'applovin-quality-service'
}

applovin {
    apiKey "4yWSuJdlSBRrsgCT2fEzZvNoBH0M1hzyqNP9ZiCTn0an2TBTdxk01Ips4aov__5L4dU8_sQpVw0_GOMLgIfJu_"
}

String timestamp = new SimpleDateFormat("MMddHHmm").format(new Date())

android {
    namespace 'com.keyboard.craft'
    compileSdk 34

    defaultConfig {
        applicationId "com.keyboards.craft"
        minSdk 23
        targetSdk 34
        versionCode 2
        versionName "1.0.2"
        setProperty("archivesBaseName", "Keyboardcraft-V" + versionName + "C${versionCode}-$timestamp")
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }
    buildFeatures {
        viewBinding true
        buildConfig = true
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.8.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.11.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    //banner
    implementation 'io.github.youth5201314:banner:2.2.2'
    //沉浸式
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
    implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
    //图片加载
    implementation 'com.github.bumptech.glide:glide:4.16.0'
    implementation 'jp.wasabeef:glide-transformations:4.3.0'
    //上拉下拉
    implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0'
    implementation 'io.github.scwang90:refresh-header-classics:2.1.0'
    implementation 'io.github.scwang90:refresh-footer-classics:2.1.0'
    //pag
    implementation 'com.tencent.tav:libpag:4.0.5.10'
    //json动画
    implementation 'com.airbnb.android:lottie:6.0.0'
    //7z
    implementation 'com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02'

    implementation("com.github.lihangleo2:ShadowLayout:3.4.0")
    implementation("androidx.room:room-ktx:2.6.1")
    implementation("androidx.room:room-runtime:2.6.1")
    //noinspection KaptUsageInsteadOfKsp
    kapt("androidx.room:room-compiler:2.6.1")
    implementation(platform("com.google.firebase:firebase-bom:32.2.2"))
    implementation("com.google.firebase:firebase-analytics-ktx")
    implementation("com.google.firebase:firebase-crashlytics-ktx")
    implementation("com.google.firebase:firebase-config-ktx")


    //--------------------MAX   (BIGO Ads、Chartboost、DT Exchangc、Googlc Ad Managcr、Google Bidding and Google AdMob、InMobi、ironSource、Liftoff Monetizc、
    //Meta Audience Network、Moloco、Panglc、Unity Ads)
    implementation("com.applovin:applovin-sdk:+")
    implementation("com.applovin.mediation:bigoads-adapter:5.3.0.1")
    implementation("com.applovin.mediation:chartboost-adapter:+")
    implementation("com.google.android.gms:play-services-base:16.1.0")
    implementation("com.applovin.mediation:fyber-adapter:+")
//Google Ad Manager
    // implementation("com.applovin.mediation:google-ad-manager-adapter:+")

//Google Bidding and Google AdMob
    //   implementation("com.applovin.mediation:google-adapter:+")
    implementation("com.applovin.mediation:inmobi-adapter:+")
    implementation("com.squareup.picasso:picasso:2.71828")
    implementation("androidx.recyclerview:recyclerview:1.1.0")
    implementation("com.applovin.mediation:ironsource-adapter:+")
    implementation("com.applovin.mediation:vungle-adapter:+")
    implementation("com.applovin.mediation:facebook-adapter:+")
    implementation("com.applovin.mediation:moloco-adapter:+")
    implementation("com.applovin.mediation:bytedance-adapter:+")
    implementation("com.applovin.mediation:unityads-adapter:+")

    //获取gaid
    implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
    implementation("com.google.android.gms:play-services-appset:16.0.1")
    //开启协程
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")


    implementation ("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
}