apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion project.sdk
    buildToolsVersion project.buildTools

    defaultConfig {
        minSdkVersion project.minSdk
        targetSdkVersion project.sdk
        versionCode 4
        versionName "1.0"
    }

    File signFile = project.file('keyInfos.properties')
    if (signFile.exists()) {
        Properties properties = new Properties()
        properties.load(new FileInputStream(signFile))
        signingConfigs {
            release {
                storeFile file(project.file(properties['keystore.filename']))
                storePassword properties['keystore.password']
                keyAlias properties['keystore.alias']
                keyPassword properties['keystore.password']
            }
        }
    }

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

            if (signFile.exists())
                signingConfig signingConfigs.release
        }
    }

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

dependencies {
    compile 'com.android.support:appcompat-v7:'+project.supportVersion
    compile 'com.android.support:cardview-v7:'+project.supportVersion

    compile 'com.jakewharton:butterknife:8.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.1.0'

    //compile ('com.github.florent37:materialviewpager:1.0.6@aar'){
    //    transitive=true
    //}

    compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
        transitive = true;
    }

    compile project(':materialviewpager')
}
