plugins {
    id 'com.android.application'
    id 'org.greenrobot.greendao'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-android-extensions'
}



android {
    signingConfigs {
        release {
        storeFile file('/Users/bytedance/aserbao/code/aserbao/A_UI/AserbaosAndroid/aserbao.jks')
            storePassword 'aserbao'
            keyAlias 'aserbao'
            keyPassword 'aserbao'
        }
    }
    compileSdkVersion rootProject.ext.android.compileSdkVersion
    defaultConfig {
        applicationId rootProject.ext.appInfo.appId
        minSdkVersion rootProject.ext.android.minSdkVersion
        renderscriptTargetApi 19 //为了使用Renderscript
        renderscriptSupportModeEnabled true
        targetSdkVersion rootProject.ext.android.targetSdkVersion
        versionCode rootProject.ext.appInfo.versionCode
        versionName rootProject.ext.appInfo.versionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags " "
                abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "mips", "mips64", "x86", "x86_64"
            }
        }
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [
                        AROUTER_MODULE_NAME: project.getName(),
                        "room.schemaLocation"  : "$projectDir/schemas".toString(),
                        "room.incremental"     : "true",
                        "room.expandProjection": "true"]
            }
        }
        signingConfig signingConfigs.release
    }
    buildTypes {
        release {
            minifyEnabled false;
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            minifyEnabled false //这是关键的，我的问题就是出在这里
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }
    /*externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }*/
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    useLibrary 'org.apache.http.legacy'

    buildFeatures {
        viewBinding true
    }

    viewBinding {
        enabled true
    }
    dataBinding {
        enabled true
    }
}
kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", project.getName())
    }
}

dependencies {
    api project(':aserbaoffmpeg')
    api project(path: ':thirdlibs')

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation rootProject.ext.dependencies["appcompat"]
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    api project(path: ':base')
    implementation project(path: ':arouter')
    implementation project(path: ':jetpack')
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'

    api rootProject.ext.dependencies["kotlin"]
    api rootProject.ext.dependencies["appcompat"]
    api rootProject.ext.dependencies["lifecycleExtensions"]
    api rootProject.ext.dependencies["butterknife"]
    kapt rootProject.ext.dependencies["butterknife_compiler"]
    //UI
    api rootProject.ext.dependencies["material"]
    api rootProject.ext.dependencies["recyclerview"]
    api project(path: ':camera')
    api project(path: ':common')
    api  'pl.droidsonroids.gif:android-gif-drawable:1.2.12'

    kapt  rootProject.ext.dependencies["aroutercompiler"]
    annotationProcessor rootProject.ext.dependencies["aroutercompiler"]

//    api rootProject.ext.dependencies["rxjava3"]
//    api rootProject.ext.dependencies["reactive_stream"]

    // 压缩解压 https://github.com/Leo0618/AndroidZip
//    implementation 'com.leo618:zip:0.0.1' // 用的26.+,在高版本AS使用报错。
}
