apply plugin: 'com.android.application'
//apply plugin: 'android-apt'
apply plugin: 'jacoco'

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'

    def VERSION_CODE = 9
    def VERSION_NAME = "0.3.1"
    def APP_NAME = 'OpenLauncher'
    def APP_PACKAGE = "com.benny.openlauncher"
    def APP_ICON ="@drawable/ic_launcher"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25
        multiDexEnabled false

        buildConfigField "boolean", "IS_TEST_BUILD", "false"
        buildConfigField "boolean", "IS_GPLAY_BUILD", "false"

        vectorDrawables.useSupportLibrary = true
        flavorDimensions "versionCode"
    }

    productFlavors {
        flavorDefault {
            applicationId APP_PACKAGE
            resValue 'string', 'app_name', APP_NAME
            manifestPlaceholders = [appIcon: APP_ICON]
            versionCode VERSION_CODE ; versionName VERSION_NAME
        }

        flavorTest {
            applicationId APP_PACKAGE + ".test"
            resValue 'string', 'app_name', '"OL Nightly"'
            manifestPlaceholders = [appIcon: APP_ICON + "_test"]
            versionCode = Integer.parseInt(new Date().format('yyMMdd'))
            versionName = new Date().format('yyMMdd')
            buildConfigField "boolean", "IS_TEST_BUILD", "true"
        }

        flavorGplay {
            applicationId APP_PACKAGE
            resValue 'string', 'app_name', APP_NAME
            manifestPlaceholders = [appIcon: APP_ICON]
            versionCode VERSION_CODE ; versionName VERSION_NAME
            buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
        }
    }

    lintOptions {
        disable 'MissingTranslation'
        disable 'ExtraTranslation'
    }

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

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    // Support libraries
    implementation 'com.android.support:recyclerview-v7:25.4.0'
    implementation 'com.android.support:appcompat-v7:25.4.0'
    implementation 'com.android.support:cardview-v7:25.4.0'
    implementation 'com.android.support:design:25.4.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v13:25.4.0'

    // UI Libs
    implementation('com.mikepenz:fastadapter:2.1.7@aar') { transitive = true }
    implementation('com.github.ozodrukh:CircularReveal:2.0.1@aar') { transitive = true; }
    implementation 'com.mikepenz:fastadapter-commons:2.1.0@aar'
    implementation 'com.mikepenz:fastadapter-extensions:2.1.7@aar'
    implementation 'com.turingtechnologies.materialscrollbar:lib:10.1.4'
    implementation 'com.github.daniel-stoneuk:material-about-library:1.4.2'
    implementation 'com.afollestad.material-dialogs:core:0.9.3.0'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'net.qiujuer.genius:blur:2.0.0'
    //compile 'in.championswimmer:SimpleFingerGestures_Android_Library:1.2'
    implementation 'com.github.championswimmer:SimpleFingerGestures_Android_Library:1.2'
    implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    implementation 'com.github.chyrta:AndroidOnboarder:0.6'
    implementation 'cat.ereza:customactivityoncrash:1.5.0'


    // Tools
    implementation 'com.jakewharton:butterknife:8.0.1'
    implementation 'com.google.code.gson:gson:2.8.0'

    // Compile project libraries
    implementation project(':app:libs:smoothviewpager')
    implementation project(':app:libs:materialpreffragment')
    implementation project(path: ':app:libs:launcheranim')

    // Android-Apt
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
}
