apply from: '../dependencies.gradle'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

android {
  compileSdkVersion versions.compileSdk
  buildToolsVersion versions.buildTools

  packagingOptions {
    exclude 'META-INF/core_release.kotlin_module'
    exclude 'META-INF/library_release.kotlin_module'
  }

  defaultConfig {
    applicationId "com.afollestad.mnmlscreenrecord"
    minSdkVersion versions.minSdk
    targetSdkVersion versions.compileSdk
    versionCode versions.publishVersionCode
    versionName versions.publishVersion
  }
}

dependencies {
  implementation project(':engine')
  implementation project(':common')
  implementation project(':notifications')
  implementation project(':theming')

  // Kotlin
  implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:' + versions.kotlin
  implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:' + versions.coroutines
  implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:' + versions.coroutines

  // Google/AndroidX
  implementation 'com.google.firebase:firebase-core:' + versions.firebaseCore
  implementation 'androidx.preference:preference:' + versions.androidxPrefs
  implementation 'androidx.lifecycle:lifecycle-extensions:' + versions.lifecycle
  kapt 'androidx.lifecycle:lifecycle-compiler:' + versions.lifecycle

  // Koin
  implementation 'org.koin:koin-androidx-scope:' + versions.koin
  implementation 'org.koin:koin-androidx-viewmodel:' + versions.koin

  // afollestad
  implementation 'com.afollestad.material-dialogs:core:' + versions.materialDialogs
  implementation 'com.afollestad.material-dialogs:files:' + versions.materialDialogs
  implementation 'com.afollestad:assent:' + versions.assent
  implementation 'com.afollestad:recyclical:' + versions.recyclical
  implementation 'com.afollestad:inline-activity-result:' + versions.inlineActivityResult

  // Glide
  implementation 'com.github.bumptech.glide:glide:' + versions.glide
  kapt 'com.github.bumptech.glide:compiler:' + versions.glide

  // Debug
  implementation("com.crashlytics.sdk.android:crashlytics:${versions.fabric}") {
    transitive = true
  }

  // Test
  testImplementation 'junit:junit:' + versions.junit
  testImplementation 'org.mockito:mockito-core:' + versions.mockito
  testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:' + versions.mockitoKotlin
  testImplementation 'com.google.truth:truth:' + versions.truth
  testImplementation 'androidx.arch.core:core-testing:' + versions.archTesting
  testImplementation project(':testutil')
}

apply from: '../spotless.gradle'
apply from: '../mock/mock.gradle'

apply plugin: "io.fabric"
apply plugin: 'com.google.gms.google-services'
