plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'com.squareup.anvil'
}

apply plugin: 'com.squareup.anvil'

android {
    compileSdkVersion versions.compileSdk
    defaultConfig {
        applicationId "com.dropbox.kaiken.sample"
        minSdkVersion 21
        compileSdkVersion versions.compileSdk
        targetSdkVersion versions.targetSdk
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
        disable 'InvalidPackage'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/annotations.kotlin_module'
    }
    buildFeatures {
        // Enables Jetpack Compose for this module
        compose true
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }

    composeOptions {
        kotlinCompilerExtensionVersion '1.0.5'
    }
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += [
                '-Xopt-in=kotlin.Experimental',
        ]
    }
}

dependencies {
    implementation deps.androidx_fragment
    implementation deps.appcompat
    implementation deps.constraint_layout
    implementation deps.coroutines
    implementation deps.coroutinesAndroid


    implementation project(":scoping")
    implementation project(":skeleton")
    implementation project(":skeleton-components")
    implementation project(":scoping-navgraph")
    implementation project(":sample:sample-with-di:helloworldfeature")

    implementation deps.dagger2
    implementation deps.material
    implementation deps.navgraph
    implementation deps.nav_ui

    kapt deps.dagger2_compiler
}
