apply plugin: 'com.android.application'
apply from: "$project.rootDir/tools/script-lint.gradle"
apply from: "$project.rootDir/tools/script-findbugs.gradle"
apply from: "$project.rootDir/tools/script-pmd.gradle"


android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.futurice.android.reservator"
        versionCode 22
        versionName "5.1.3"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        testApplicationId "com.futurice.android.reservator.test"
        testInstrumentationRunner "android.test.InstrumentationTestRunner"
    }

    signingConfigs {
        release {
            keyAlias 'futurice'
            // Create your own gradle.properties file and store the passwords there
            keyPassword RESERVATOR_KEY_PASSWORD
            storePassword RESERVATOR_KEYSTORE_PASSWORD
            storeFile file("../keystore/reservator_release.keystore")
        }

    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'LICENSE.txt'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    buildTypes {
        debug {
            applicationIdSuffix '.debug'
            versionNameSuffix '-DEBUG'

            debuggable true
            testCoverageEnabled true
        }
        release {
            signingConfig signingConfigs.release
            versionNameSuffix '-RELEASE'
            shrinkResources false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        compile "com.github.paolorotolo:appintro:$rootProject.appintroVersion"
        compile "com.android.support:support-v4:$rootProject.supportLibraryVersion"
        compile "com.android.support:appcompat-v7:$rootProject.appCompatVesion"
        compile "com.jakewharton:butterknife:$rootProject.butterknifeVersion"
        annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknifeVersion"
    }
}
