apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply from: '../publishing.gradle'

android {

  defaultConfig {
    compileSdk rootProject.COMPILE_SDK_VERSION
    minSdkVersion rootProject.MIN_SDK_VERSION
    targetSdkVersion rootProject.TARGET_SDK_VERSION
    consumerProguardFiles 'proguard-rules.pro'
  }

  testOptions.unitTests.includeAndroidResources = true

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

  buildTypes.all { buildType ->
    buildType.javaCompileOptions.annotationProcessorOptions.arguments =
        [
            logEpoxyTimings: "true"
        ]
  }
}

configurations.all { strategy ->
  strategy.resolutionStrategy.force rootProject.deps.androidAnnotations, rootProject.deps.androidRecyclerView,
      rootProject.deps.androidDesignLibrary, rootProject.deps.androidAppcompat, rootProject.deps.junit,
      rootProject.deps.robolectric, rootProject.deps.mockito
}

dependencies {
  implementation rootProject.deps.androidAppcompat
  implementation rootProject.deps.androidAnnotations
  implementation rootProject.deps.androidRecyclerView
  implementation rootProject.deps.androidDesignLibrary
  api project(':epoxy-annotations')

  kapt project(':epoxy-processor')
  kaptTest project(':epoxy-processor')

  testImplementation rootProject.deps.junit
  testImplementation rootProject.deps.robolectric
  testImplementation rootProject.deps.mockito
  testImplementation rootProject.deps.androidTestCore
}
