apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'okreplay'
apply plugin: 'kotlin-kapt'

android {
  compileSdkVersion androidConfig.compileSdkVersion

  sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
  }

  adbOptions {
    installOptions "-g"
  }

  defaultConfig {
    applicationId "okreplay.sample"
    minSdkVersion 21 // so we get faster multidex
    targetSdkVersion androidConfig.targetSdkVersion
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true
    multiDexEnabled true
  }

  lintOptions {
    disable 'InvalidPackage'
  }

  useLibrary 'android.test.runner'
  useLibrary 'android.test.base'
  useLibrary 'android.test.mock'
}

dependencies {
  debugImplementation project(':okreplay-core')
  releaseImplementation project(':okreplay-noop')
  implementation dep.appcompat
  implementation dep.androidXAnnotations
  implementation dep.kotlinStdLib
  implementation dep.guava
  implementation "com.google.android.material:material:1.0.0"
  implementation 'androidx.multidex:multidex:2.0.1'
  implementation "androidx.vectordrawable:vectordrawable:1.0.1"
  implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
  implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
  implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
  compileOnly 'com.google.auto.value:auto-value:1.5.2'
  implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
  implementation dep.okio
  implementation dep.okhttp
  implementation dep.jsr305
  kapt 'com.ryanharter.auto.value:auto-value-moshi:0.4.3'
  compileOnly 'com.ryanharter.auto.value:auto-value-moshi-annotations:0.4.3'
  testImplementation dep.junit
  annotationProcessor 'com.google.auto.value:auto-value:1.5.2'
  kapt 'com.google.auto.value:auto-value:1.5.2'
  androidTestAnnotationProcessor 'com.google.auto.value:auto-value:1.5.2'
  androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  androidTestImplementation project(':okreplay-espresso')
  androidTestImplementation dep.androidXAnnotations
  androidTestImplementation dep.androidXTestRunner
  androidTestImplementation dep.androidXTestRules
  androidTestImplementation dep.okio
  androidTestImplementation dep.okhttp
  androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
}
