apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions' //扩展插件

apply plugin: 'kotlin-kapt'  //kapt3插件

android {
    signingConfigs {
        config {
            keyAlias 'ktmp'
            keyPassword 'ktmp123456'
            storeFile file('../ktmp.jks')
            storePassword 'ktmp123456'
        }
    }
    compileSdkVersion rootProject.ext.android.compileSdkVersion
    defaultConfig {
        applicationId "com.hazz.kotlinmvp"
        minSdkVersion rootProject.ext.android.minSdkVersion
        targetSdkVersion rootProject.ext.android.targetSdkVersion
        versionCode rootProject.ext.android.versionCode
        versionName rootProject.ext.android.versionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }
        signingConfig signingConfigs.config
        // 实现毛玻璃那种透明的效果需要添加的库
        renderscriptTargetApi 19
        renderscriptSupportModeEnabled true    // Enable RS support

        ndk {

            //APP的build.gradle设置支持的SO库架构
            abiFilters 'armeabi', 'armeabi-v7a', 'x86'
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
            debuggable true
            signingConfig signingConfigs.config
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable false
            signingConfig signingConfigs.config
            zipAlignEnabled true
        }

    }
    // 自定义输出配置
    android.applicationVariants.all { variant ->
        variant.outputs.all {
            outputFileName = "kotlinmvp_v${variant.versionName}_${variant.name}.apk"
        }
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
    productFlavors {

    }


    dexOptions {
        jumboMode true
    }

    lintOptions {
        abortOnError false
    }


}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1') {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
    // Support库
    implementation rootProject.ext.supportLibs
    // 网络请求库
    implementation rootProject.ext.networkLibs
    // RxJava2
    implementation rootProject.ext.rxJavaLibs
    implementation rootProject.ext.otherLibs
    // APT dependencies(Kotlin内置的注解处理器)
    kapt rootProject.ext.annotationProcessorLibs

    // 底部菜单
    implementation('com.flyco.tablayout:FlycoTabLayout_Lib:2.1.0@aar') {
        exclude group: 'com.android.support', module: 'support-v4'
    }
    //kotlin 支持库
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    //GlideOkHttp
    implementation(rootProject.ext.glideOkhttp) {
        exclude group: 'glide-parent'
    }
    //smartRefreshLayout 下拉刷新
    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
    implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'
    //Banner
    implementation 'cn.bingoogolapple:bga-banner:2.2.4@aar'
    // 视屏播放器
    implementation 'com.shuyu:GSYVideoPlayer:2.1.1'
    //Logger
    implementation 'com.orhanobut:logger:2.1.1'
    //Google开源的一个布局控件
    implementation 'com.google.android:flexbox:0.3.1'
    implementation project(':multiple-status-view')
    //模糊透明 View
    implementation 'com.github.mmin18:realtimeblurview:1.1.0'
    //leakCanary
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
    //腾讯 bugly
    implementation 'com.tencent.bugly:crashreport:2.6.6.1'
    //运行时权限
    implementation'pub.devrel:easypermissions:1.2.0'

}
