apply plugin: 'com.android.application'
apply plugin: 'android-apt'

//String umengAppKey = System.getenv('CNODEMD_UMENG_APP_KEY')
String umengAppKey = ""
File localPropertiesFile = project.rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    Properties properties = new Properties()
    properties.load(localPropertiesFile.newDataInputStream())
    umengAppKey = properties.getProperty("umeng.appkey", umengAppKey)
}

android {

    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "cn.tomoya.android.md"
        minSdkVersion 9
        targetSdkVersion 24
        versionCode Integer.parseInt(new Date().format("yyyyMMdd"))
        versionName "1.1"

        manifestPlaceholders = [
                UMENG_CHANNEL: "pybbsmd",
                UMENG_APPKEY: umengAppKey
        ]
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
    }

    lintOptions {
        abortOnError false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:design:24.1.1'
    compile 'com.android.support:cardview-v7:24.1.1'

    compile 'com.jakewharton:butterknife:8.2.1'
    apt 'com.jakewharton:butterknife-compiler:8.2.1'

    compile 'com.google.code.gson:gson:2.7'
    compile 'net.danlew:android.joda:2.9.4.1'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'

    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.rengwuxian.materialedittext:library:2.1.4'
    compile 'com.pnikosis:materialish-progress:1.7'
    compile 'com.melnykov:floatingactionbutton:1.3.0'
    compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:1.0.0'
    compile 'com.github.chrisbanes:PhotoView:1.2.6'

    compile 'org.tautua.markdownpapers:markdownpapers-core:1.4.4'
    compile 'org.jsoup:jsoup:1.9.2'

    compile 'com.umeng.analytics:analytics:6.0.1'
}
