apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.alibaba.weex"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 5
        versionName "0.5.2.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        ndk{
            abiFilters "x86"
            abiFilters "armeabi"
        }
    }
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def outputFile = output.outputFile
            if (outputFile != null && outputFile.name.equals('app-debug.apk')) {
                def fileName = outputFile.name.replace("app-debug.apk", "playground.apk")
                output.outputFile = new File(outputFile.parent, fileName)
            }
        }
    }
    signingConfigs {
        release {
            storeFile file("tools/weex.jks")
            storePassword "123456"
            keyAlias "weex"
            keyPassword "123456"
        }
    }
    buildTypes {
//        release {
//            signingConfig signingConfigs.release
//            minifyEnabled false
//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//        }
        debug {
            testCoverageEnabled true
        }
    }
    sourceSets {
        main {
            java {
                srcDirs = ["src/main/java", "src/main/java_zxing"];
            }
        }
    }
    lintOptions {
        abortOnError false
    }

    packagingOptions {
        exclude 'LICENSE.txt'
    }
    testOptions {
        reportDir = "$project.buildDir/test/report"
    }

}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile 'junit:junit:4.12'
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    /*source dependency*/
    // compile project(':weex_sdk')
    compile 'com.taobao.android:weex_sdk:0.8.0'
    compile project(':appframework')
    compile 'com.squareup.okhttp:okhttp:2.3.0'
    compile 'com.squareup.okhttp:okhttp-ws:2.3.0'
    compile 'com.squareup.okio:okio:1.0.1'
    compile 'com.alibaba:fastjson:1.1.46.android'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:support-annotations:23.1.1'
    compile 'com.taobao.android:weex_inspector:0.0.8.5'
    compile 'com.journeyapps:zxing-android-embedded:3.4.0'
}
