plugins {
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.jetbrainsKotlinAndroid)
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
}

android {
    namespace 'com.base.filerecoveryrecyclebin'
    compileSdk 34

    defaultConfig {
        applicationId "com.asdqwe.ada.aaa"
        minSdk 24
        targetSdk 34
        versionCode 29
        versionName "3.8"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        setProperty("archivesBaseName", "DumpsterPhotoRecovery-v${versionName}")
    }
    signingConfigs {
        realse {
            storeFile file('../ac.jks')
            storePassword 'ac123456'
            keyAlias 'ac'
            keyPassword 'ac123456'
        }
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.realse
            // 设置是否要自动上传
            firebaseCrashlytics {
                mappingFileUploadEnabled true
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        viewBinding true
        buildConfig true
    }
}
gradle.taskGraph.whenReady {
    tasks.each { task ->
        if (task.name.contains("uploadCrashlyticsMappingFile")) {
            task.enabled = false
        }
    }
}

dependencies {

    implementation(fileTree([dir: "libs", include: ["*.aar", "*.jar"], exclude: []]))

    implementation libs.androidx.core.ktx
    implementation libs.androidx.appcompat
    implementation libs.material
    implementation libs.androidx.activity
    implementation libs.androidx.constraintlayout
    testImplementation libs.junit
    androidTestImplementation libs.androidx.junit
    androidTestImplementation libs.androidx.espresso.core

    def lifecycle_version = "2.7.0"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

    //第三方UI
    implementation("com.airbnb.android:lottie:6.4.0")
    implementation("com.github.bumptech.glide:glide:4.16.0")
    implementation("com.github.pokercc:ExpandableRecyclerView:0.9.3")
    implementation 'com.github.zhpanvip:viewpagerindicator:1.2.3'
    implementation("io.supercharge:shimmerlayout:2.1.0")

    //图片处理
//    implementation 'org.opencv:opencv:4.10.0'

    //网络
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
    implementation "com.squareup.okhttp3:okhttp:4.9.0"
    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'

    //facebook
    implementation("com.facebook.android:facebook-android-sdk:[8,9)")

    //广告
//    implementation("com.google.android.gms:play-services-ads:23.1.0")
//    implementation 'com.google.ads.mediation:applovin:13.0.1.0'
//    implementation 'com.google.ads.mediation:facebook:6.17.0.0'
//    implementation 'com.google.ads.mediation:mintegral:16.7.21.0'
//    implementation 'com.google.ads.mediation:pangle:5.9.0.4.0'

    //max
//    implementation 'com.applovin:applovin-sdk:+'
//    implementation 'com.applovin.mediation:google-adapter:+'
//    implementation 'com.applovin.mediation:facebook-adapter:+'
//    implementation 'com.applovin.mediation:mintegral-adapter:+'
//    implementation 'com.applovin.mediation:bytedance-adapter:+'
//    implementation 'com.applovin.mediation:ironsource-adapter:+'

    implementation("com.google.ads.mediation:facebook:6.18.0.0")
    implementation("com.google.ads.mediation:mintegral:16.8.61.0")
    implementation("com.google.ads.mediation:pangle:6.3.0.4.0")
    implementation("com.applovin:applovin-sdk:13.0.1")
    implementation("com.applovin.mediation:google-ad-manager-adapter:23.5.0.0")
    implementation("com.applovin.mediation:google-adapter:23.5.0.0")
    implementation("com.applovin.mediation:facebook-adapter:6.18.0.0")
    implementation("com.applovin.mediation:mintegral-adapter:16.8.61.0")
    implementation("com.applovin.mediation:bytedance-adapter:6.3.0.4.0")
    implementation("com.applovin.mediation:vungle-adapter:7.4.2.0")

    //Google UMP
    //https://docs.tradplusad.com/docs/tradplussdk_android_doc_v6/privacy_policy/google_ump/
    implementation 'com.google.android.ump:user-messaging-platform:2.1.0'

    //firebase
    implementation platform('com.google.firebase:firebase-bom:32.3.1')
    implementation("com.google.firebase:firebase-messaging")
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-analytics:21.6.2'
    implementation("com.google.firebase:firebase-messaging-directboot")


    //google 内购订阅
    def billing_version = "7.0.0"
    implementation "com.android.billingclient:billing:$billing_version"


    //work
    implementation("androidx.work:work-runtime-ktx:2.7.1") // 请使用最新版本
    implementation 'com.reyun.solar.engine.oversea:solar-engine-core:1.2.8.3'
    implementation 'com.reyun.solar.engine:se-plugin-oaid:1.2.8.3'
}