apply plugin: 'com.android.application'
apply plugin: 'com.taobao.android.weex.plugin.gradle'

android {
    compileSdkVersion project.compileSdkVersion
    buildToolsVersion project.buildToolsVersion

    defaultConfig {
        applicationId "com.weex.app"
        minSdkVersion project.appMinSdkVersion
        targetSdkVersion project.targetSdkVersion
        versionCode 1
        versionName "1.0.0"
        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", "weex-app.apk")
                output.outputFile = new File(outputFile.parent, fileName)
            }
        }
    }
    signingConfigs {
        debug {
            storeFile file("tools/debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
    }
    sourceSets {
        main {
            java {
                srcDirs = ["src/main/java", "src/main/java_zxing"];
            }
        }
    }
    lintOptions {
        abortOnError false
    }

    packagingOptions {
        exclude 'LICENSE.txt'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.taobao.android:weex_sdk:0.16.0'
    compile 'com.google.code.findbugs:jsr305:2.0.1'
    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.squareup.picasso:picasso:2.5.2'
    compile "com.alibaba:fastjson:${project.fastjsonLibVersion}"
    compile "com.android.support:support-v4:${project.supportLibVersion}"
    compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
    compile "com.android.support:design:${project.supportLibVersion}"
    compile "com.android.support:support-annotations:${project.supportLibVersion}"
    compile 'com.taobao.android:weex_inspector:0.10.0.5'
    compile 'com.journeyapps:zxing-android-embedded:3.4.0'
    // PLUGIN GRADLE EXTENSIONS START
    compile 'com.taobao.android:weexplugin-loader:1.3'
    compile 'com.taobao.android:weexplugin-processor:1.3'
    compile 'com.taobao.android:weexplugin-annotation:1.3'
    // PLUGIN GRADLE EXTENSIONS END
}
