plugins {
    id("com.android.application")
    id("com.google.gms.google-services")
    alias(libs.plugins.kotlin.android)
    id("com.google.firebase.crashlytics")
}

android {
    namespace = "com.swiftcleaner.chovey"
    compileSdk = 34


    defaultConfig {
        applicationId = "com.a.s"
        minSdk = 28
        targetSdk = 34
        versionCode = 13
        versionName = "1.3"
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }
    // 添加签名配置
    signingConfigs {
        create("release") {
            storeFile = file("../my-release-key.keystore")
            storePassword = "123456"
            keyAlias = "my_alias"
            keyPassword = "123456"
        }
    }
    buildTypes {
        release {
            isMinifyEnabled = false
            signingConfig = signingConfigs.getByName("release")
            // 设置是否要自动上传
            firebaseCrashlytics {
                mappingFileUploadEnabled = true
            }
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding = true
        buildConfig = true
    }
    dependenciesInfo {
        includeInApk = true
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }

}
gradle.taskGraph.whenReady {
    tasks.forEach { task ->
        if (task.name.contains("uploadCrashlyticsMappingFile")) {
            task.enabled = false
        }
    }
}

dependencies {

    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.appcompat)
    implementation(libs.material)
    implementation(libs.androidx.constraintlayout)
    implementation(libs.gson)
    implementation(libs.kotlinx.coroutines.core)
    implementation(libs.glide)
    annotationProcessor(libs.glide.compiler)
    implementation(libs.lottie)
    implementation(libs.facebook.android.sdk)
    implementation(libs.user.messaging.platform)
    implementation(libs.expandablerecyclerview)
    implementation(platform(libs.firebase.bom))
    implementation(libs.firebase.analytics.ktx)
    implementation(libs.firebase.messaging.ktx)
    implementation(libs.firebase.messaging.directboot)
    implementation(libs.firebase.crashlytics)
    implementation(libs.androidx.lifecycle.process)
    implementation(libs.okhttp)
    implementation(libs.logging.interceptor)
    implementation(libs.solar.engine)
    implementation(libs.vungle)
    implementation(libs.facebook)
    implementation(libs.mintegral)
    implementation(libs.pangle)
    implementation(libs.applovin)
    implementation(libs.applovin.google)
    implementation(libs.applovin.admob)
    implementation(libs.applovin.facebook)
    implementation(libs.applovin.mintegral)
    implementation(libs.applovin.pangle)
    implementation(libs.applovin.vungle)
    implementation(libs.androidx.work.runtime.ktx)
    api("com.geyifeng.immersionbar:immersionbar:3.2.2")
    implementation("io.reactivex.rxjava3:rxjava:3.1.5")
    implementation("io.reactivex.rxjava3:rxandroid:3.0.0")


    implementation ("androidx.viewpager2:viewpager2:1.0.0")
    implementation ("androidx.fragment:fragment:1.5.0")


    implementation ("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
//    debugApi ("com.squareup.leakcanary:leakcanary-android:2.12")//leakcanary
}