apply plugin: 'android-sdk-manager'
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.ANDROID_BUILD_SDK_VERSION
    buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion project.ANDROID_BUILD_MIN_SDK_VERSION
        targetSdkVersion project.ANDROID_BUILD_TARGET_SDK_VERSION
        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'])
    compile 'com.android.support:appcompat-v7:'+project.SUPPORT_VERSION
    compile 'com.android.support:recyclerview-v7:'+project.SUPPORT_VERSION
    compile 'com.android.support:cardview-v7:'+project.SUPPORT_VERSION
    compile 'com.jakewharton:butterknife:7.0.1'


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

}
