apply plugin: 'com.android.application'

Properties secret = new Properties()
if (!project.hasProperty('type')) {
    secret.load(project.rootProject.file('secret.properties').newDataInputStream())
}

android {
    signingConfigs {
        release {
            keyAlias secret.getProperty("signing.key")
            keyPassword secret.getProperty('signing.pwd')
            storeFile file('actionshow')
            storePassword secret.getProperty('signing.pwd')
        }

        ci {
            keyAlias 'elbbbirdstudio'
            keyPassword 'android'
            storeFile file('elbbbird-studio-debug.keystore')
            storePassword 'android'
        }
    }
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.encore.actionnow"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName VERSION_NAME
    }
    buildTypes {

        debug {
            if (project.hasProperty('type')) {
                signingConfig signingConfigs.ci
            } else {
                signingConfig signingConfigs.release
            }
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        release {
            if (project.hasProperty('type')) {
                signingConfig signingConfigs.ci
            } else {
                signingConfig signingConfigs.release
            }
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile project(':socialsdk')
}
