buildscript {

}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'  // Google Services plugin

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {

        applicationId "com.gbeatty.arxiv"
        minSdkVersion 21

        targetSdkVersion 28
        versionCode 49
        versionName "4.1.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
//    signingConfigs {
//        if (keystorePropertiesFile.exists()) {
//            release {
//                keyAlias keystoreProperties['keyAlias']
//                keyPassword keystoreProperties['keyPassword']
//                storeFile file(keystoreProperties['storeFile'])
//                storePassword keystoreProperties['storePassword']
//            }
//        }
//    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//            if (keystorePropertiesFile.exists()) {
//                signingConfig signingConfigs.release
//            }
        }
        debug {
            testCoverageEnabled true
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
    lintOptions {
        abortOnError false
    }
    flavorDimensions("freedom")
    productFlavors {
        google {
            dimension "freedom"
            buildConfigField "boolean", "DONATIONS_GOOGLE", "true"
        }
        fdroid {
            dimension "freedom"
            buildConfigField "boolean", "DONATIONS_GOOGLE", "false"
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.1'
    implementation 'com.google.firebase:firebase-ads:18.3.0'

    //butterknife
    implementation 'com.jakewharton:butterknife:10.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.github.satyan:sugar:1.3'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.codemybrainsout.rating:ratingdialog:1.0.8'
    implementation 'ru.alexbykov:nopaginate:0.4.4'

    implementation 'com.miguelcatalan:materialsearchview:1.4.0'

    implementation 'com.afollestad:sectioned-recyclerview:0.5.0'

    implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'

    implementation 'org.sufficientlysecure:donations:2.6'


//    implementation 'io.github.kexanie.library:MathView:0.0.6'
//    implementation 'in.hourglass.mathrender:katexmathview:1.0'
//    implementation 'com.github.Nishant-Pathak:MathView:v1.1'

    implementation project(":katexmathview")

    androidTestImplementation('tools.fastlane:screengrab:1.1.0')

    androidTestImplementation 'androidx.annotation:annotation:1.0.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test:rules:1.1.1'
    // Optional -- Hamcrest library
    androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
    // Optional -- UI testing with Espresso
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
    // Optional -- UI testing with UI Automator
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'

    testImplementation 'junit:junit:4.12'

}

repositories {
    jcenter()
    maven { url 'https://jitpack.io' }
//    maven { url 'https://maven.fabric.io/public' }
}