allprojects {
  repositories {
    jcenter()
  }
}

ext {
  // Android
  androidBuildToolsVersion = "25.0.3"
  androidMinSdkVersion = 19
  androidTargetSdkVersion = 25
  androidCompileSdkVersion = 25

  // Testing
  junitVersion = "4.12"
  espressoVersion = "2.2.2"

  // Library versions
  supportLibVersion = "25.3.1"
  constraintLayoutVersion = "1.0.2"
  rxAndroidVersion = "2.0.1"
  rxJavaVersion = "2.1.0"
  rxJavaIneropVersion = "0.10.0"
  daggerVersion = "2.10"
  retrofitVersion = "2.3.0"
  okhttpVersion = "3.8.0"
  gsonVersion = "2.8.1"
  butterKnifeVersion = "8.6.0"
  autoValueVersion = "1.4"
  autoValueGsonVersion = "0.4.6"
  sqlBriteVersion = "1.1.1"
  timberVersion = "4.5.1"
  glideVersion = "3.7.0"
  stethoVersion = "1.5.0"
  leakCanaryVersion = "1.5.1"
  materialValuesVersion = "1.1.1"
  exoPlayerVersion = "r2.4.1"

  // Testing
  junitDependency = "junit:junit:${junitVersion}"
  espressoDependency = "com.android.support.test.espresso:espresso-core:${espressoVersion}"
  espressoContribDependency = "com.android.support.test.espresso:espresso-contrib:${espressoVersion}"
  espressoIntentsDependency = "com.android.support.test.espresso:espresso-intents:${espressoVersion}"
  espressoIdlingResDependency = "com.android.support.test.espresso:espresso-idling-resource:${espressoVersion}"

  espressoExcludeGroups = [
      group1: "com.android.support", module1: "support-annotations",
      group2: "com.android.support", module2: "support-v4",
      group3: "com.android.support", module3: "appcompat-v7",
      group4: "com.android.support", module4: "design",
      group5: "com.android.support", module5: "recyclerview-v7",
  ]

  // Libraries
  supportDependencies = [
      appCompat       : "com.android.support:appcompat-v7:${supportLibVersion}",
      cardView        : "com.android.support:cardview-v7:${supportLibVersion}",
      design          : "com.android.support:design:${supportLibVersion}",
      recyclerView    : "com.android.support:recyclerview-v7:${supportLibVersion}",
      constraintLayout: "com.android.support.constraint:constraint-layout:${constraintLayoutVersion}",
  ]

  rxDependencies = [
      rxAndroid    : "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
      rxJava       : "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
      rxJavaInterop: "com.github.akarnokd:rxjava2-interop:${rxJavaIneropVersion}"
  ]

  daggerDependencies = [
      dagger   : "com.google.dagger:dagger:${daggerVersion}",
      daggerApt: "com.google.dagger:dagger-compiler:${daggerVersion}",
  ]

  retrofitDependencies = [
      retrofit     : "com.squareup.retrofit2:retrofit:${retrofitVersion}",
      rxJavaAdapter: "com.squareup.retrofit2:adapter-rxjava2:${retrofitVersion}",
      gsonConverter: "com.squareup.retrofit2:converter-gson:${retrofitVersion}",
  ]

  butterKnifeDependencies = [
      butterknife   : "com.jakewharton:butterknife:${butterKnifeVersion}",
      butterknifeApt: "com.jakewharton:butterknife-compiler:${butterKnifeVersion}",
  ]

  autoValueDependencies = [
      autoValueApt     : "com.google.auto.value:auto-value:${autoValueVersion}",
      autoValueProvided: "com.jakewharton.auto.value:auto-value-annotations:${autoValueVersion}",
      gsonApt          : "com.ryanharter.auto.value:auto-value-gson:${autoValueGsonVersion}",
      gsonProvided     : "com.ryanharter.auto.value:auto-value-gson:${autoValueGsonVersion}",
  ]

  stethoDependencies = [
      stetho       : "com.facebook.stetho:stetho:${stethoVersion}",
      networkHelper: "com.facebook.stetho:stetho-okhttp3:${stethoVersion}",
  ]

  okhttpDependency = "com.squareup.okhttp3:okhttp:${okhttpVersion}"
  gsonDependency = "com.google.code.gson:gson:${gsonVersion}"
  sqlBriteDependency = "com.squareup.sqlbrite:sqlbrite:${sqlBriteVersion}"
  timberDependency = "com.jakewharton.timber:timber:${timberVersion}"
  glideDependency = "com.github.bumptech.glide:glide:${glideVersion}"
  leakCanaryDependency = "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
  materialValuesDependency = "blue.aodev:material-values:${materialValuesVersion}"
  exoPlayerDependency = "com.google.android.exoplayer:exoplayer:${exoPlayerVersion}"
}