plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'dev.rikka.tools.autoresconfig'
}

android {
    namespace 'net.ankio.bluetooth'
    compileSdk 33

    defaultConfig {
        applicationId "net.ankio.bluetooth"
        minSdk 24
        targetSdk 33
        versionCode 4
        versionName "1.0.2"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        ndk {
            // 设置支持的SO库架构
            abiFilters  'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    //使用viewBinding
    viewBinding {
        enabled = true
    }
    autoResConfig {
        generateClass.set(true)
        generateRes.set(false)
        generatedClassFullName.set("net.ankio.utils.LangList")
        generatedArrayFirstItem.set("SYSTEM")
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.md'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE.md'
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/gson/FieldAttributes.txt'
        exclude 'META-INF/gson/LongSerializationPolicy.txt'
        exclude 'META-INF/gson/annotations.txt'
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.preference:preference-ktx:1.2.0'
    implementation 'androidx.browser:browser:1.5.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    //主题库
    implementation 'io.github.prathameshmm02.themeEngine:themeEngine:1.1.0'
    //状态栏
    implementation 'com.gitee.zackratos:UltimateBarX:dev-SNAPSHOT'
    //Html转换
    implementation 'dev.rikka.rikkax.html:html-ktx:1.1.2'
    //webdav
    implementation 'com.github.thegrizzlylabs:sardine-android:0.8'
    //匿名统计
    implementation 'com.flurry.android:analytics:14.2.0@aar'
    //gson
    implementation 'com.google.code.gson:gson:2.10.1'
    //异步操作
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
    //权限请求 支持Androidx
    implementation 'com.guolindev.permissionx:permissionx:1.7.1'
    //让你的适配器一目了然，告别代码冗余
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
    //Xposed组件库
    compileOnly 'de.robv.android.xposed:api:82'
}