apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    //签名配置
    signingConfigs {
        debugConfig {
            keyAlias "1"
            keyPassword "happy1993_chen"
            storeFile file("E:/Workspace/happy1993_chen")
            storePassword "happy1993_chen"
        }
        releaseConfig {
            keyAlias "1"
            keyPassword "happy1993_chen"
            storeFile file("E:/Workspace/happy1993_chen")
            storePassword "happy1993_chen"
        }
    }

    lintOptions {
        abortOnError false
    }

    dexOptions {
        dexInProcess true
        preDexLibraries true
        javaMaxHeapSize "4g"//越大越好
    }

    defaultConfig {
        multiDexEnabled true
        applicationId "com.fanchen.imovie"
        minSdkVersion 19
        //noinspection ExpiredTargetSdkVersion
        targetSdkVersion 25
        versionCode 20191012
        versionName "3.10.12 beta"
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debugConfig
        }
        release {
            signingConfig signingConfigs.releaseConfig
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/beans.xml'
    }
}

afterEvaluate {
    tasks.matching {
        it.name.startsWith('dex')
    }.each { dx ->
        if (dx.additionalParameters == null) {
            dx.additionalParameters = ['--multi-dex']
        } else {
            dx.additionalParameters += '--multi-dex'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.3'

    /** *******eventbus sdk 事件总线                 *********/
    compile 'org.greenrobot:eventbus:3.0.0'

    /** *******butterknife sdk ioc                 *********/
    compile 'com.jakewharton:butterknife:5.1.1'

    /** *******support 支持库                 *********/
    compile 'com.android.support:design:25.4.0'
    compile 'com.android.support:gridlayout-v7:25.4.0'
    compile 'com.android.support:cardview-v7:25.4.0'

    /** *******swipebackhelper 滑动返回                 *********/
    compile('com.jude:swipebackhelper:3.1.2') {
        exclude module: 'appcompat-v7'
    }

    /** *******   今日头条屏幕适配方案             *********/
    compile 'me.jessyan:autosize:1.1.2'

    /** *******gson json                 *********/
    compile 'com.google.code.gson:gson:2.8.2'

    /** *******squareup 全家桶                 *********/
    compile 'com.squareup.retrofit2:retrofit:2.5.0'

    /** *******picasso 图片加载                 *********/
    compile 'com.squareup.picasso:picasso:2.5.2'

    /** *******    视频嗅探      *********/

    compile 'com.github.fanchen001:Sniffing:1.0.5'

    /** *******aria 下载管理框架                 *********/
    annotationProcessor 'com.arialyy.aria:aria-compiler:3.5'
    compile('com.arialyy.aria:aria-core:3.5') {
        exclude module: 'appcompat-v7'
    }

    /** ******* kotlin runtime            *********/
    compile 'org.jetbrains.kotlin:kotlin-stdlib:1.3.31'

    // Cling library 用来实现投屏
    compile 'org.fourthline.cling:cling-core:2.1.1'
    compile 'org.fourthline.cling:cling-support:2.1.1'

    // Jetty library 用来实现投屏
    compile 'org.eclipse.jetty:jetty-server:8.1.12.v20130726'
    compile 'org.eclipse.jetty:jetty-servlet:8.1.12.v20130726'
    compile 'org.eclipse.jetty:jetty-client:8.1.12.v20130726'

    /** *******zxing sdk 二维码                 *********/
    compile files('libs/zxing.jar')

    /** *******ijkplayer sdk 视频播放                 *********/
    compile files('libs/lib_ijkplayer.jar')

    /** *******SMSSDK 验证码                 *********/
    compile files('libs/Mob_SMS_Sdk.jar')

    /** *******BmobSDK 后台数据库                 *********/
    compile files('libs/BmobSDK_V3.4.7_0527.jar')

    /** ******* 西瓜视频 sdk                 *********/
    compile files('libs/xigua.p2p.jar')

    /** ******* java js引擎         *********/
    compile files('libs/rhino-1.7.7.1.jar')

    /** ******* kotlin 写的 m3u8下载器          *********/
    compile files('libs/m3u8downloader_1.2.jar')

    /** ******* tv_sdk    *********/
    compile files('libs/p2p_tv_sdk.jar')

    /** ******* 迅雷下载器 支持 http https ftp ed2k thunder magnet          *********/
    compile files('libs/xunlei.downloadlib.jar')

    /** *******bugly 崩溃监测                 *********/
    compile files('libs/bugly_crash_release.jar')

    /** ******* lite-orm orm框架                 *********/
    compile files('libs/lite-orm-1.9.2.jar')

    /** ******* nineoldandroids 动画框架                 *********/
    compile files('libs/nineoldandroids-2.4.0.jar')

    /** *******友盟sdk                 *********/
    compile files('libs/umeng_share.jar')

    //compile files('libs/sniffing-video-1.0.3.jar')
}
