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") ?: signingConfigs.debug.storeFile)
            storePassword loadProperty("NISPOK_RELEASE_PASSWORD") ?: signingConfigs.debug.storePassword
            keyAlias loadProperty("NISPOK_RELEASE_KEY_ALIAS") ?: signingConfigs.debug.keyAlias
            keyPassword loadProperty("NISPOK_RELEASE_KEY_PASSWORD") ?: signingConfigs.debug.keyPassword
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }

}

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