plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
}

repositories {
    flatDir {
        dirs 'libs/android'
    }
}

android {
    compileSdkVersion rootProject.ext.compileVersion
    buildToolsVersion rootProject.ext.buildVersion

    defaultConfig {
        applicationId "com.ez.ertc.demo.debug"
        resValue "string","app_name","ERTC-Demo"
        minSdkVersion rootProject.ext.minSdk
        targetSdkVersion rootProject.ext.targetSdk
        versionCode 14
        versionName "1.0.13"
        multiDexEnabled true
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            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'
    }
    // 白板SDK需要viewBinding ERTC不需要
    buildFeatures {
        viewBinding  true
    }
    // 如ERTC与白板一起集成需要配置so
    packagingOptions {
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libmarsxlog.so'
        pickFirst 'lib/armeabi-v7a/libmarsxlog.so'
        pickFirst 'lib/arm64-v8a/libmbedtls.so'
        pickFirst 'lib/armeabi-v7a/libmbedtls.so'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "androidx.core:core-ktx:$coreKtxVersion"
    implementation "androidx.appcompat:appcompat:$appcompatVersion"
    implementation "com.google.android.material:material:$materialVersion"
    implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion"

    // 基础依赖包，必须要依赖
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'

    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
    implementation "com.google.code.gson:gson:$gsonVersion"
    implementation 'androidx.multidex:multidex:2.0.1'

    //日志管理
    api 'com.orhanobut:logger:2.2.0'

    implementation 'com.jakewharton:butterknife:10.2.1'
    //bug收集
    implementation 'com.tencent.bugly:crashreport:4.1.9'
    // 会议demo
    implementation project(path: ':app-meeting')
}

def releaseTime() {
    return new Date().format("yyyy-MM-dd-HH-mm", TimeZone.getTimeZone("UTC"))
}