apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {

  compileSdkVersion Integer.parseInt(project.COMPILE_SDK_VERSION)
  buildToolsVersion BUILD_TOOLS_VERSION

  defaultConfig {
    minSdkVersion project.LIB_MINIMUM_SDK_VERSION
    targetSdkVersion Integer.parseInt(project.TARGET_SDK_VERSION)
    multiDexEnabled true
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

  flavorDimensions "mode"
  productFlavors {
    dev { dimension "mode" }
    prod { dimension "mode" }
  }

  buildTypes {
    debug {
      resValue "string", "authenticator_account_type", "compat"
      minifyEnabled true
    }
    release {
      minifyEnabled true
    }
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

  kotlinOptions {
    jvmTarget = "1.8"
  }

  lintOptions {
    abortOnError false
  }
}

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

  implementation "androidx.appcompat:appcompat:${APPCOMPAT_VERSION}"
  implementation "androidx.core:core-ktx:${CORE_VERSION}"
  implementation "androidx.constraintlayout:constraintlayout:${CONSTRAINT_LAYOUT_VERSION}"
  implementation "io.reactivex:rxjava:${RXJAVA_VERSION}"
  implementation "io.reactivex:rxandroid:${RXANDROID_VERSION}"

  implementation "com.github.tinder:statemachine:${STATEMACHINE_VERSION}"

  implementation "com.google.android.material:material:${MATERIAL_VERSION}"

  implementation "com.jakewharton.rxbinding:rxbinding:${JW_RX_BINDING_VERSION}"
  implementation "com.jakewharton.rxbinding:rxbinding-design:${JW_RX_BINDING_VERSION}"
  implementation "com.jakewharton.rxbinding:rxbinding-support-v4:${JW_RX_BINDING_VERSION}"
  implementation "com.jakewharton.rxbinding:rxbinding-appcompat-v7:${JW_RX_BINDING_VERSION}"
  implementation "com.jakewharton.rxbinding:rxbinding-recyclerview-v7:${JW_RX_BINDING_VERSION}"

  implementation "org.parceler:parceler-api:${PARCELER_VERSION}"
  kapt "org.parceler:parceler:${PARCELER_VERSION}"

  implementation "com.airbnb.android:epoxy:${EPOXY_VERSION}"
  kapt "com.airbnb.android:epoxy-processor:${EPOXY_VERSION}"

  testImplementation "junit:junit:${JUNIT_VERSION}"
  testImplementation "org.mockito:mockito-core:${MOCKITO_CORE_VERSION}"

  androidTestImplementation "androidx.test:runner:${RUNNER_VERSION}"
  androidTestImplementation "androidx.test.espresso:espresso-core:${ESPRESSO_VERSION}"
  androidTestImplementation "androidx.test:rules:${RULES_VERSION}"
  androidTestImplementation "org.mockito:mockito-android:${MOCKITO_CORE_ANDROID_VERSION}"
}
