plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-android'
//    id 'kotlin-android-extensions'
    id 'kotlin-kapt'
}

android {
    compileSdk 32

    dataBinding {
        enabled = true
    }

    viewBinding {
        enabled = true
    }

    defaultConfig {
        applicationId "com.easygbs.easygbd"
        minSdk 19
        targetSdk 32
        versionCode 202400812
        versionName '2.0.25.0812'
        multiDexEnabled true

        ndk {
            abiFilters 'arm64-v8a','armeabi-v7a'
        }

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        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'
    }
    applicationVariants.all { variant ->
        variant.outputs.all { output ->
            def fileName = "EasyGBD-Android_${variant.versionName}.apk"
            output.outputFileName = fileName
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32"
    implementation "androidx.navigation:navigation-fragment:2.3.0"
    implementation "androidx.navigation:navigation-ui:2.3.0"
    implementation "androidx.navigation:navigation-fragment-ktx:2.3.0"
    implementation "androidx.navigation:navigation-ui-ktx:2.3.0"
    implementation "androidx.navigation:navigation-dynamic-features-fragment:2.3.0"
    kapt 'androidx.room:room-compiler:2.2.5'
    implementation   'androidx.room:room-runtime:2.2.4'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    api 'pub.devrel:easypermissions:3.0.0'
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
    api project(path: ':easygbs')
    implementation project(':qr')
    api files("libs/libuvccamera-release.aar")
    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'android.arch.lifecycle:extensions:1.0.0'
    implementation 'android.arch.lifecycle:reactivestreams:1.0.0'
    implementation 'android.arch.lifecycle:extensions:1.0.0'
    implementation 'android.arch.lifecycle:reactivestreams:1.0.0'
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0"
    implementation "androidx.viewpager2:viewpager2:1.0.0"
    implementation "com.github.bumptech.glide:glide:4.15.1"
    annotationProcessor "com.github.bumptech.glide:compiler:4.15.1"
}