ext.deps = [:]
def deps = [:]
def versions = [:]

versions.room = "2.1.0-alpha03"
versions.lifecycle = "2.0.0"
versions.support = "1.0.0"
versions.junit = "4.12"
versions.espresso = "3.1.0-alpha4"
versions.retrofit = "2.3.0"
versions.okhttp_logging_interceptor = "3.9.0"
versions.mockito = "2.7.19"
versions.mockito_all = "1.10.19"
versions.mockito_android = "2.22.0"
versions.constraint_layout = "2.0.0-alpha2"
versions.android_gradle_plugin = '3.3.0'
versions.rxjava2 = "2.1.3"
versions.rx_android = "2.0.1"
versions.axt_runner = "1.1.0-alpha4"
versions.axt_rules = "1.1.0-alpha4"
versions.hamcrest = "2.1"
versions.kotlin = "1.3.0"
versions.koin = "1.0.2"
versions.paging = "2.1.0-rc01"

def support = [:]
support.annotations = "androidx.annotation:annotation:$versions.support"
support.app_compat = "androidx.appcompat:appcompat:$versions.support"
support.recyclerview = "androidx.recyclerview:recyclerview:$versions.support"
support.design = "com.google.android.material:material:$versions.support"
support.v4 = "androidx.legacy:legacy-support-v4:$versions.support"
support.core_utils = "androidx.legacy:legacy-support-core-utils:$versions.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"

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"

def retrofit = [:]
retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
retrofit.rx_adapter = "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit"
retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit"

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"

def axt = [:]
axt.runner = "androidx.test:runner:$versions.axt_runner"
axt.rules = "androidx.test:rules:$versions.axt_rules"

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"

def kotlin = [:]
kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
kotlin.test = "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin"
kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
kotlin.allopen = "org.jetbrains.kotlin:kotlin-allopen:$versions.kotlin"

def koin = [:]
koin.core = "org.koin:koin-core:$versions.koin"
koin.android = "org.koin:koin-android:$versions.koin"
koin.architecture = "org.koin:koin-androidx-viewmodel:$versions.koin"
koin.test = "org.koin:koin-test:$versions.koin"

def build_versions = [:]
build_versions.min_sdk = 21
build_versions.target_sdk = 28
build_versions.build_tools = "28.0.3"

deps.kotlin = kotlin
deps.koin = koin
deps.support = support
deps.retrofit = retrofit
deps.lifecycle = lifecycle
deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"
deps.room = room
deps.mockito = mockito
deps.axt = axt
deps.espresso = espresso
deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
deps.okhttp_logging_interceptor = "com.squareup.okhttp3:logging-interceptor:${versions.okhttp_logging_interceptor}"
deps.paging_ktx = "androidx.paging:paging-runtime-ktx:$versions.paging"
deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
deps.junit = "junit:junit:$versions.junit"
deps.hamcrest = "org.hamcrest:hamcrest:$versions.hamcrest"

ext.build_versions = build_versions
ext.deps = deps

static def addRepos(RepositoryHandler handler) {
    handler.google()
    handler.jcenter()
    handler.maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

ext.addRepos = this.&addRepos