ext {

    androidXVersion = '1.0.0'

    rxJavaVersion = '3.0.2'
    rxAndroidVersion = '3.0.0'

    circleImageVersion = '3.1.0'

    picassoVersion = '2.71828'
    daggerVersion = '2.13'

    junitVersion = '4.12'
    mockitoVersion = '1.10.19'
    hamcrestVersion = '1.1'
    robolectricVersion = '3.0'
    gsonVersion = '2.8.0'

    supportPackage = 'com.android.support'

    reactivePackage = 'io.reactivex.rxjava3'

    hdodenhofPackage = 'de.hdodenhof'
    picassoPackage = 'com.squareup.picasso'

    daggerPackage = 'com.google.dagger'
    javaxPackage = 'javax.annotation'
    gsonPackage = 'com.google.code.gson'

    junitPackage = 'junit'
    mockitoPackage = 'org.mockito'
    hamcrestPackage = 'org.hamcrest'
    robolectricPackage = 'org.robolectric'

    androidXdependencies = [
            material  : buildDependency('com.google.android.material', 'material', '1.0.0'),
            annotation: buildDependency('androidx.annotation', 'annotation', androidXVersion),
            appCompat : buildDependency('androidx.appcompat', 'appcompat', androidXVersion)
    ]

    rxDependencies = [
            rxJava   : buildDependency(reactivePackage, 'rxjava', rxJavaVersion),
            rxAndroid: buildDependency(reactivePackage, 'rxandroid', rxAndroidVersion)]

    daggerDependencies = [
            dagger        : buildDependency(daggerPackage, 'dagger', daggerVersion),
            daggerCompiler: buildDependency(daggerPackage, 'dagger-compiler', daggerVersion)]

    circleImageView = buildDependency(hdodenhofPackage, 'circleimageview', circleImageVersion)
    picasso = buildDependency(picassoPackage, 'picasso', picassoVersion)
    gson = buildDependency(gsonPackage, 'gson', gsonVersion)

    testingDependencies = [
            junit      : buildDependency(junitPackage, 'junit', junitVersion),
            mockito    : buildDependency(mockitoPackage, 'mockito-core', mockitoVersion),
            robolectric: buildDependency(robolectricPackage, 'robolectric', robolectricVersion),
            hamcrest   : buildDependency(hamcrestPackage, 'hamcrest-library', hamcrestVersion)]
}

static String buildDependency(String pack, String dependency, String version) {
    return "${pack}:${dependency}:${version}"
}
