plugins {

    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
    id 'kotlin-kapt'
}
static def releaseTime() {
    return new Date().format("MM.dd.HH.mm", TimeZone.getTimeZone("GMT+8"))
}

android {
    namespace 'com.colorful.keyboard.theme'
    compileSdk 34

    defaultConfig {
        applicationId "com.colorful.keyboard.theme"
        minSdk 21
        targetSdk 34
        versionCode 3
        versionName "1.0.3"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled= true
        setProperty("archivesBaseName", "ColorfulKeyboard_V" + defaultConfig.versionName + "(${defaultConfig.versionCode})"+"-"+releaseTime())
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            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 {

    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'

    implementation"androidx.recyclerview:recyclerview:1.3.0"
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
    implementation "de.hdodenhof:circleimageview:3.1.0"
    implementation"androidx.lifecycle:lifecycle-process:2.6.1"
    implementation "com.android.support:multidex:1.0.3"
    implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.2"
    implementation ("com.github.bumptech.glide:glide:4.11.0")
    annotationProcessor ("com.github.bumptech.glide:compiler:4.11.0")
    implementation ("com.android.support:multidex:1.0.3")
    implementation ("com.squareup.retrofit2:retrofit:2.6.1")
    implementation ("com.squareup.retrofit2:converter-gson:2.5.0")
    implementation ("com.squareup.retrofit2:adapter-rxjava:2.1.0")
    implementation ("io.reactivex.rxjava2:rxandroid:2.1.1")
    implementation ("io.reactivex:rxjava:1.2.7")
    implementation ("io.reactivex:rxjava:1.2.7")
    implementation ("io.reactivex:rxandroid:1.2.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 "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"

    implementation ("com.squareup.okhttp3:okhttp:4.9.0")
    implementation ("com.squareup.okhttp3:logging-interceptor:3.12.2")
    implementation 'jp.wasabeef:glide-transformations:4.3.0'
    //7z
    implementation 'com.github.omicronapps:7-Zip-JBinding-4Android:Release-16.02-2.02'
    //沉浸式
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
    implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
    // firebase
    implementation(platform("com.google.firebase:firebase-bom:33.1.2"))// Import the Firebase BoM
    implementation("com.google.firebase:firebase-analytics")
    implementation("com.google.firebase:firebase-crashlytics")
    implementation("com.google.firebase:firebase-config")
    implementation("com.google.firebase:firebase-analytics-ktx")
    implementation("com.google.firebase:firebase-crashlytics-ktx")



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

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

}