apply plugin: 'com.android.application'

def loadProperty(name) {
    hasProperty(name) ? "${getProperty(name)}" : ""
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        applicationId "com.nispok.snackbar"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0.0"
    }

    signingConfigs {
        release {
            storeFile file(loadProperty("NISPOK_RELEASE_KEYSTORE_PATH"))
            storePassword loadProperty("NISPOK_RELEASE_PASSWORD")
            keyAlias loadProperty("NISPOK_RELEASE_KEY_ALIAS")
            keyPassword loadProperty("NISPOK_RELEASE_KEY_PASSWORD")
        }
    }

    buildTypes {
        release {
            signingConfig loadProperty("NISPOK_RELEASE_KEYSTORE_PATH") ? signingConfigs.release : signingConfigs.debug
        }
    }

}

dependencies {
    compile project(':lib')
    compile "com.android.support:appcompat-v7:21.0.0"
}
