apply plugin: 'com.android.application'

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion project.sdk
    buildToolsVersion project.buildTools

    defaultConfig {
        minSdkVersion project.minSdk
        targetSdkVersion project.sdk
        versionCode 1
        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
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:' + project.supportVersion

    compile 'com.squareup.picasso:picasso:2.5.2'

    compile project(":materialleanback")
    compile('com.crashlytics.sdk.android:crashlytics:2.5.1@aar') {
        transitive = true;
    }
}
