apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.oss.licenses.plugin'


def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))


android {
    signingConfigs {
        config {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }
    compileSdkVersion 27
    buildToolsVersion '28.0.2'
    testOptions {
        unitTests.returnDefaultValues = true
    }
    defaultConfig {
        applicationId "com.fekracomputers.islamiclibrary"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 30
        versionName "1.4.4"
        vectorDrawables.useSupportLibrary = false
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.config
    }


    flavorDimensions "price"
    productFlavors {
        free {
            dimension "price"
            applicationIdSuffix ""
            signingConfig signingConfigs.config
        }
        pro1 {
            dimension "price"
            applicationIdSuffix ".pro1"
            signingConfig signingConfigs.config
        }
        pro2 {
            dimension "price"
            applicationIdSuffix ".pro2"
            signingConfig signingConfigs.config
        }
        pro3 {
            dimension "price"
            applicationIdSuffix ".pro3"
            signingConfig signingConfigs.config
        }
        pro4 {
            dimension "price"
            applicationIdSuffix ".pro4"
            signingConfig signingConfigs.config
        }
        pro5 {
            dimension "price"
            applicationIdSuffix ".pro5"
            signingConfig signingConfigs.config
        }
    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
        }
    }
    dexOptions {
        javaMaxHeapSize "2g"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
//        textOutput 'stdout'
//        textReport true
//        htmlReport true
//        htmlOutput file("lint-report.html")
        checkReleaseBuilds false
        abortOnError false
        warningsAsErrors false
    }
}
ext {
    supportLibraryVersion = "27.1.1"
    xpece = "2.2.0"
}

dependencies {
    implementation "com.android.support:support-v4:$supportLibraryVersion"
    implementation "com.android.support:cardview-v7:$supportLibraryVersion"
    implementation "com.android.support:recyclerview-v7:$supportLibraryVersion"
    implementation "com.android.support:preference-v7:$supportLibraryVersion"
    implementation "com.android.support:design:$supportLibraryVersion"
    implementation "com.android.support:support-vector-drawable:$supportLibraryVersion"
    implementation "com.android.support:animated-vector-drawable:$supportLibraryVersion"
    implementation "com.android.support:support-annotations:$supportLibraryVersion"
    implementation "com.android.support:transition:$supportLibraryVersion"
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    implementation 'com.webianks.library:easy-feedback:1.0.2'
    implementation "net.xpece.android:support-preference:$xpece"
    implementation "net.xpece.android:support-preference-color:$xpece"
    implementation "net.xpece.android:support-spinner:$xpece"
    //implementation 'com.jaredrummler:colorpicker:1.0.1'
    implementation 'com.xwray:groupie:2.0.3'
    implementation 'com.github.daniel-stoneuk:material-about-library:2.2.4'
    implementation 'com.jakewharton.timber:timber:4.6.1'
    implementation 'com.polyak:icon-switch:1.0.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
    implementation 'org.jsoup:jsoup:1.11.2'
    //firebase
    implementation "com.google.firebase:firebase-core:16.0.4"
    implementation "com.google.android.gms:play-services-oss-licenses:16.0.1"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
    ///
    implementation 'com.anjlab.android.iab.v3:library:1.0.44'
    implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation project(':colorpicker')
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.1", {
        exclude group: "com.android.support", module: "support-annotations"
    })
    androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
        exclude group: 'com.android.support', module: 'support-v4'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'recyclerview-v7'
    }
}
apply plugin: "com.google.gms.google-services"

