ext {

    compiler = [
            java  : JavaVersion.VERSION_11,
            kotlin: '1.8.10'
    ]

    android = [
            minSdk    : 21,
            targetSdk : 33,
            compileSdk: 33
    ]

    build = [
            apiKey: System.getenv("API_KEY_TMDB"),
    ]

    application = [
            id                       : 'com.adesso.movee',
            versionCode              : 2,
            versionName              : "0.1.1",
            testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
    ]

    version = [
            gradle             : '7.4.1',
            hilt               : '2.44.2',
            retrofit           : '2.9.0',
            okhttp             : '4.10.0',
            moshi              : '1.14.0',
            moshiLazyAdapter   : '2.2',
            constraintLayout   : '2.1.4',
            navigation         : '2.5.3',
            lifecycle          : '2.5.1',
            lifecycleExtensions: '2.2.0',
            androidKtx         : '1.9.0',
            coroutines         : '1.6.4',
            chucker            : '3.5.2',
            glide              : '4.14.2',
            ok2curl            : '0.8.0',
            material           : '1.5.4',
            preference         : '1.2.0',
            viewPager2         : '1.0.0',
            timber             : '5.0.1',
            spotless           : '6.1.0',
            detekt             : '1.22.0',
            benManesVersion    : '0.44.0',
            jacoco             : '0.8.8',
            junitJacocoPlugin  : '0.16.0',
            ktlint             : '0.45.2',
            jltschKtlintPlugin : '11.0.0',
            jUnit              : '4.13.2',
            espresso           : '3.5.1',
            robolectric        : '4.9.2',
            arcCoreTesting     : '2.1.0',
            fragmentTesting    : '1.5.5',
            testCore           : '1.5.0',
            testExtJunit       : '1.1.5',
            testRules          : '1.5.0',
            mockk              : '1.13.4',
            leakcanary         : '2.10',
            desugar            : '2.0.1',
            kotlinResult       : '1.1.16',
    ]

    dependency = [
            kotlinn = [
                    "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$compiler.kotlin",
                    "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version.coroutines",
                    "org.jetbrains.kotlin:kotlin-reflect:$compiler.kotlin"
            ],

            androidx = [
                    "androidx.core:core-ktx:$version.androidKtx",
                    "androidx.navigation:navigation-fragment-ktx:$version.navigation",
                    "androidx.navigation:navigation-ui-ktx:$version.navigation",
                    "androidx.constraintlayout:constraintlayout:$version.constraintLayout",
                    "androidx.preference:preference-ktx:$version.preference"
            ],

            lifecycle = [
                    "androidx.lifecycle:lifecycle-runtime-ktx:$version.lifecycle",
                    "androidx.lifecycle:lifecycle-extensions:$version.lifecycleExtensions",
                    "androidx.lifecycle:lifecycle-viewmodel-ktx:$version.lifecycle",
                    "androidx.lifecycle:lifecycle-livedata-ktx:$version.lifecycle"
            ],

            hiltt = [
                    "com.google.dagger:hilt-android:$version.hilt"
            ],

            common = [
                    "com.github.bumptech.glide:glide:$version.glide",
                    "com.jakewharton.timber:timber:$version.timber",
                    "com.michael-bull.kotlin-result:kotlin-result:$version.kotlinResult"
            ],

            commonKapt = [
                    "androidx.lifecycle:lifecycle-common-java8:$version.lifecycle",
                    "com.google.dagger:hilt-android-compiler:$version.hilt",
                    "androidx.databinding:databinding-compiler:$version.gradle"
            ],

            network = [
                    "com.squareup.retrofit2:retrofit:$version.retrofit",
                    "com.squareup.okhttp3:logging-interceptor:$version.okhttp",
                    "com.squareup.retrofit2:converter-moshi:$version.retrofit",
                    "com.squareup.moshi:moshi-kotlin:$version.moshi",
                    "com.squareup.moshi:moshi-adapters:$version.moshi",
                    "com.serjltt.moshi:moshi-lazy-adapters:$version.moshiLazyAdapter",
                    "com.github.mrmike:ok2curl:$version.ok2curl"
            ],

            commonTest = [
                    "junit:junit:$version.jUnit",
                    "androidx.arch.core:core-testing:$version.arcCoreTesting",
                    "androidx.test:core:$version.testCore",
                    "org.robolectric:robolectric:$version.robolectric",
                    "androidx.test.ext:junit:$version.testExtJunit",
                    "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version.coroutines",
                    "io.mockk:mockk:$version.mockk",
                    "com.squareup.okhttp3:mockwebserver:$version.okhttp"
            ],

            material = [
                    "com.google.android.material:material:$version.material"
            ],

            commonInstrumentationTest = [
                    "androidx.navigation:navigation-testing:$version.navigation",
                    "androidx.test.espresso:espresso-core:$version.espresso",
                    "androidx.test.ext:junit:$version.testExtJunit",
                    "androidx.test:rules:$version.testRules",
                    "io.mockk:mockk-android:$version.mockk"
            ],

            commonDebug = [
                    "com.github.ChuckerTeam.Chucker:library:$version.chucker",
                    "androidx.fragment:fragment-testing:$version.fragmentTesting",
                    "com.squareup.leakcanary:leakcanary-android:$version.leakcanary"
            ],

            commonRelease = [
                    "com.github.ChuckerTeam.Chucker:library-no-op:$version.chucker"
            ],

            desugar = [
                    "com.android.tools:desugar_jdk_libs:$version.desugar",
            ]
    ]
}
