apply plugin: 'com.android.application'

android {
    compileSdkVersion getProperty('COMPILE_SDK_VERSION') as int
    buildToolsVersion getProperty('BUILD_TOOLS_VERSION')

    defaultConfig {
        applicationId getProperty('BASE_PACKAGENAME')
        minSdkVersion getProperty('MIN_SDK_VERSION')
        targetSdkVersion getProperty('TARGET_SDK_VERSION')
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties'
        exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml'
    }

    lintOptions {
        abortOnError false
    }

    productFlavors.whenObjectAdded { flavor ->
        def flavorData = rootProject.ext[flavor.name]
        flavor.applicationId flavorData.packageName
        flavor.versionCode flavorData.versionCode
        flavor.versionName flavorData.versionName
    }

    productFlavors {
        paid {}
        free {}
    }
}

dependencies {
    compile libraries.rxandroid
    compile project(':app')
}