apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

apply from: '../compile_options.gradle'
apply from: '../dagger_kapt.gradle'
apply from: '../dependencies_unit_tests.gradle'

android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.github.alexdochioiu.core"
        minSdkVersion 23
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    dynamicFeatures = [":cakes_ui", ":cakes_networking", ":cakes_repository", ":dashboard_ui", ":about_ui"]
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation networkingDependencies.okhttp3.okhttp
    implementation networkingDependencies.retrofit2.retrofit
    implementation networkingDependencies.retrofit2.moshi_converter_adapter

    implementation loggingDependency.okhttp3_interceptor

    // README
    //  Any dependency needed by more than one dynamic feature modules should be added here. Adding
    //  the same dependency with 'implementation' to multiple dynamic feature modules will cause
    //  gradle to fail building the project. (It will complain that the same library will be packaged
    //  more than once)
    api loggingDependency.timber

    implementation networkingDependencies.okhttp3.glide_downloader
    api networkingDependencies.retrofit2.rxjava2_call_adapter

    api core.support.appcompat
    api core.kotlin.jdk
    api core.kotlin.ktx

    api core.rxjava2.rxjava
    api core.rxjava2.rxkotlin
    //api core.rxjava2.rxandroid

    api core.navigation_ktx.fragment
    api core.navigation_ktx.ui

    api ui.ktx.fragment
    api ui.ktx.lifecycle
    api ui.lifecycle_extension
    api ui.material
    api ui.constraint_layout
    api ui.swipe_refersh_layout

    api ui.glide

    api di.dagger.annotations
}
