ext.deps = [:]
def versions = [:]
versions.json = "20190722"
versions.arch_core = "2.1.0"
versions.room = "2.2.4"
versions.lifecycle = "2.2.0"
versions.fragment_ktx = " 1.2.3"
versions.activity_ktx = "1.1.0"
versions.transition = "1.3.1"
versions.viewmodel_savedstate = "2.2.0"
versions.legacy_support = "1.0.0"
versions.recyclerview_selection  = "1.1.0-rc01"
versions.viewpager2 = "1.0.0"
versions.material = "1.1.0-rc02"
versions.support = "1.1.0"
versions.app_compat = "1.2.0-alpha03"
versions.dagger = '2.26'
versions.assisted_inject = '0.5.0'
versions.junit = '4.13'
versions.espresso = "3.2.0"
versions.retrofit = '2.6.1'
versions.okhttp = '3.12.3'
// OkHttp works on Android 5.0+ (API level 21+) and on Java 8+.
// The OkHttp 3.12.x branch supports Android 2.3+ (API level 9+) and Java 7+.
// These platforms lack support for TLS 1.2 and should not be used.
// But because upgrading is difficult we will backport critical fixes to the 3.12.x branch through December 31, 2020.
versions.mockito = '3.3.3'
versions.mockito_all = "1.10.19"
versions.mockito_android = '3.3.3'
versions.dexmaker = "2.19.0"
versions.constraint_layout = "2.0.0-beta4"
versions.glide = '4.11.0'
versions.timber = "4.7.1"
versions.slf4j = "1.7.28"
versions.android_gradle_plugin = '3.6.1'
versions.rxjava2 = "2.2.19"
versions.rx_android = "2.1.1"
versions.atsl_runner = "1.2.0"
versions.atsl_rules = "1.2.0"
versions.atsl_junit = "1.1.1"
versions.hamcrest = "1.3"
versions.kotlin = '1.3.70'
versions.paging = "2.1.1"
versions.navigation_testing = "1.0.0-alpha08"
versions.navigation_plugin = "2.2.0"
versions.navigation = "2.2.1"
versions.work = "2.3.3"
versions.crashlytics_gradle_plugin = "2.0.0-beta02"
versions.google_services = "4.3.3"
versions.vision = "20.0.0"
versions.firebase = "17.3.0"
versions.firebase_crashlytics = "17.0.0-beta01"
versions.firebase_messaging = "20.1.5"
versions.firebase_dynamic_links = "19.1.0"
versions.firebase_analytics = "17.3.0"
versions.firebase_ml_vision = "24.0.1"
versions.firebase_ml_vision_image_label = "19.0.0"
versions.firebase_ml_vision_automl = "18.0.3"
versions.fresco = "1.14.2"
versions.spongy_castle = "1.58.0.0"
versions.ui_automator = '2.2.0'
versions.gson = '2.8.5'
versions.ktx = '1.2.0'
versions.preference = '1.1.0'
versions.coroutines = '1.3.4'
versions.data_binding_compiler = versions.android_gradle_plugin
def deps = [:]

def coroutines = [:]
coroutines.android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutines"
coroutines.core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines"
deps.coroutines = coroutines

def okhttp = [:]
okhttp.client = "com.squareup.okhttp3:okhttp:$versions.okhttp"
okhttp.logging = "com.squareup.okhttp3:logging-interceptor:$versions.okhttp"
okhttp.mock_web_server = "com.squareup.okhttp3:mockwebserver:$versions.okhttp"
deps.okhttp = okhttp

def support = [:]
support.annotations = "androidx.annotation:annotation:$versions.support"
support.app_compat = "androidx.appcompat:appcompat:$versions.app_compat"
support.recyclerview = "androidx.recyclerview:recyclerview:$versions.support"
support.cardview = "androidx.cardview:cardview:$versions.legacy_support"
support.recyclerview_selection = "androidx.recyclerview:recyclerview-selection:$versions.recyclerview_selection"
support.design = "com.google.android.material:material:$versions.material"
support.coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:$versions.support"
support.vectordrawable = "androidx.vectordrawable:vectordrawable:$versions.support"
support.core_utils = "androidx.legacy:legacy-support-core-utils:$versions.support"
deps.support = support

def room = [:]
room.runtime = "androidx.room:room-runtime:$versions.room"
room.compiler = "androidx.room:room-compiler:$versions.room"
room.rxjava2 = "androidx.room:room-rxjava2:$versions.room"
room.testing = "androidx.room:room-testing:$versions.room"
deps.room = room

def lifecycle = [:]
lifecycle.runtime = "androidx.lifecycle:lifecycle-runtime:$versions.lifecycle"
lifecycle.extensions = "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle"
lifecycle.java8 = "androidx.lifecycle:lifecycle-common-java8:$versions.lifecycle"
lifecycle.compiler = "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle"
lifecycle.viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycle"
lifecycle.viewmodel_savedstate= "androidx.lifecycle:lifecycle-viewmodel-savedstate:$versions.viewmodel_savedstate"
lifecycle.livedata = "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycle"
lifecycle.reactive_streams = "androidx.lifecycle:lifecycle-reactivestreams:$versions.lifecycle"
deps.lifecycle = lifecycle

def arch_core = [:]
arch_core.testing = "androidx.arch.core:core-testing:$versions.arch_core"
deps.arch_core = arch_core

def retrofit = [:]
retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
retrofit.mock = "com.squareup.retrofit2:retrofit-mock:$versions.retrofit"
deps.retrofit = retrofit

def dagger = [:]
dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
dagger.android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
dagger.compiler = "com.google.dagger:dagger-compiler:$versions.dagger"
dagger.android_support_compiler = "com.google.dagger:dagger-android-processor:$versions.dagger"
dagger.assisted_inject = "com.squareup.inject:assisted-inject-processor-dagger2:$versions.assisted_inject"

deps.dagger = dagger

def espresso = [:]
espresso.core = "androidx.test.espresso:espresso-core:$versions.espresso"
espresso.contrib = "androidx.test.espresso:espresso-contrib:$versions.espresso"
espresso.intents = "androidx.test.espresso:espresso-intents:$versions.espresso"
deps.espresso = espresso

def atsl = [:]
atsl.runner = "androidx.test:runner:$versions.atsl_runner"
atsl.rules = "androidx.test:rules:$versions.atsl_runner"
atsl.ext_junit = "androidx.test.ext:junit:$versions.atsl_junit"
deps.atsl = atsl

def mockito = [:]
mockito.core = "org.mockito:mockito-core:$versions.mockito"
mockito.all = "org.mockito:mockito-all:$versions.mockito_all"
mockito.android = "org.mockito:mockito-android:$versions.mockito_android"
deps.mockito = mockito

def kotlin = [:]
kotlin.stdlib8 = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin"
kotlin.test = "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin"
kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
kotlin.serialization = "org.jetbrains.kotlin:kotlin-serialization:$versions.kotlin"
kotlin.allopen = "org.jetbrains.kotlin:kotlin-allopen:$versions.kotlin"
kotlin.android_extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$versions.kotlin"
kotlin.version = "1.3.70"

deps.kotlin = kotlin

deps.paging_ktx = "androidx.paging:paging-runtime-ktx:$versions.paging"

deps.json = "org.json:json:$versions.json"

def glide = [:]
glide.runtime = "com.github.bumptech.glide:glide:$versions.glide"
glide.compiler = "com.github.bumptech.glide:compiler:$versions.glide"
deps.glide = glide

def slf4j = [:]
slf4j.api = "org.slf4j:slf4j-api:$versions.slf4j"
deps.slf4j = slf4j

deps.dexmaker = "com.linkedin.dexmaker:dexmaker-mockito:$versions.dexmaker"
deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
deps.timber = "com.jakewharton.timber:timber:$versions.timber"
deps.junit = "junit:junit:$versions.junit"
deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"
deps.hamcrest = "org.hamcrest:hamcrest-all:$versions.hamcrest"
deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
ext.deps = deps

def build_versions = [:]
build_versions.min_sdk = 16
build_versions.compile_sdk = 29
build_versions.target_sdk = 29
build_versions.build_tools = "29.0.0"
ext.build_versions = build_versions

def work = [:]
work.testing = "androidx.work:work-testing:$versions.work"
work.runtime_ktx = "androidx.work:work-runtime-ktx:$versions.work"
work.rxjava = "androidx.work:work-rxjava2:$versions.work"
work.gcm = "androidx.work:work-gcm:$versions.work"
deps.work = work

def navigation = [:]
navigation.testing = "android.arch.navigation:navigation-testing:$versions.navigation_testing"
navigation.runtime = "androidx.navigation:navigation-runtime-ktx:$versions.navigation"
navigation.fragment = "androidx.navigation:navigation-fragment-ktx:$versions.navigation"
navigation.safe_args_plugin = "androidx.navigation:navigation-safe-args-gradle-plugin:$versions.navigation_plugin"
navigation.ui = "androidx.navigation:navigation-ui-ktx:$versions.navigation"
deps.navigation = navigation

def preference = [:]
preference.pref = "androidx.preference:preference:$versions.preference"
preference.ktx = "androidx.preference:preference-ktx:$versions.preference"
deps.preference = preference

def google_services = [:]
google_services.plugin = "com.google.gms:google-services:$versions.google_services"
deps.google_services = google_services

def fresco = [:]
fresco.fresco = "com.facebook.fresco:fresco:$versions.fresco"
fresco.animated_gif = "com.facebook.fresco:animated-gif:$versions.fresco"
fresco.animated_webp = "com.facebook.fresco:animated-webp:$versions.fresco"
fresco.webp_support = "com.facebook.fresco:webpsupport:$versions.fresco"
deps.fresco = fresco

def spongy_castle = [:]
spongy_castle.core = "com.madgag.spongycastle:core:$versions.spongy_castle"
spongy_castle.prov = "com.madgag.spongycastle:prov:$versions.spongy_castle"
spongy_castle.bcpkix = "com.madgag.spongycastle:bcpkix-jdk15on:$versions.spongy_castle"
deps.spongy_castle = spongy_castle

deps.data_binding_compiler = "com.android.databinding:compiler:$versions.data_binding_compiler"
deps.vision = "com.google.android.gms:play-services-vision:$versions.vision"
deps.crashlytics_gradle_plugin = "com.google.firebase:firebase-crashlytics-gradle:$versions.crashlytics_gradle_plugin"
deps.firebase_crashlytics = "com.google.firebase:firebase-crashlytics:$versions.firebase_crashlytics"
deps.firebase = "com.google.firebase:firebase-core:$versions.firebase"
deps.firebase_ml_vision = "com.google.firebase:firebase-ml-vision:$versions.firebase_ml_vision"
deps.firebase_ml_vision_image_label = "com.google.firebase:firebase-ml-vision-image-label-model:$versions.firebase_ml_vision_image_label"
deps.firebase_ml_vision_automl = "com.google.firebase:firebase-ml-vision-automl:$versions.firebase_ml_vision_automl"
deps.firebase_messaging = "com.google.firebase:firebase-messaging:$versions.firebase_messaging"
deps.firebase_dynamic_links = "com.google.firebase:firebase-dynamic-links:$versions.firebase_dynamic_links"
deps.firebase_analytics = "com.google.firebase:firebase-analytics:$versions.firebase_analytics"
deps.ui_automator = "androidx.test.uiautomator:uiautomator:$versions.ui_automator"
deps.gson = "com.google.code.gson:gson:$versions.gson"
deps.ktx = "androidx.core:core-ktx:$versions.ktx"
deps.fragment = "androidx.fragment:fragment:$versions.fragment_ktx"
deps.fragment_ktx = "androidx.fragment:fragment-ktx:$versions.fragment_ktx"
deps.activity_ktx = "androidx.activity:activity-ktx:$versions.activity_ktx"
deps.transition = "androidx.transition:transition:$versions.transition"
deps.viewpager2 = "androidx.viewpager2:viewpager2:$versions.viewpager2"

ext.deps = deps

static def addRepos(RepositoryHandler handler) {
    handler.google()
    handler.jcenter()
    // handler.maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    handler.maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
    // For the support libraries
    handler.maven { url "https://maven.google.com" }
    // com.github.javiersantos:AppUpdater
    handler.maven { url 'https://jitpack.io' }
}

ext.addRepos = this.&addRepos
