plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
    id 'androidx.navigation.safeargs.kotlin'
    id 'kotlin-parcelize'
}

android {
    defaultConfig {
        compileSdk = 33
        applicationId "com.crazylegend.vigilante"
        minSdkVersion 24
        targetSdkVersion 33
        versionCode 20
        versionName "1.2.7"
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        javaCompileOptions {
            annotationProcessorOptions {
                arguments += ["room.incremental": "true", "room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }

    buildTypes {
        debug {
            minifyEnabled false
            crunchPngs false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }

    buildFeatures {
        viewBinding = true
    }

    kapt {
        correctErrorTypes = true
        useBuildCache = true
    }

    bundle {
        language {
            enableSplit = false
        }
    }
}

dependencies {
    //ui
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation "com.github.skydoves:colorpickerview:2.3.0"
    implementation "androidx.transition:transition-ktx:1.4.1"

    //core
    implementation 'androidx.preference:preference-ktx:1.2.1'
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.fragment:fragment-ktx:1.6.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation "androidx.startup:startup-runtime:1.1.1"

    //android tests
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    //unit tests
    testImplementation 'junit:junit:4.13.2'
    testImplementation "io.mockk:mockk:$mockk"
    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"

    //nav
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

    //dagger
    implementation "com.google.dagger:dagger:$daggerVersion"
    kapt "com.google.dagger:dagger-compiler:$daggerVersion"

    //hilt
    implementation "com.google.dagger:hilt-android:$daggerVersion"
    kapt "com.google.dagger:hilt-android-compiler:$daggerVersion"

    //hilt jetpack
    implementation "androidx.hilt:hilt-navigation-fragment:$hiltJetpackVersion"
    implementation "androidx.hilt:hilt-work:$hiltJetpackVersion"
    kapt "androidx.hilt:hilt-compiler:$hiltJetpackVersion"

    //lifecycle
    implementation "androidx.lifecycle:lifecycle-service:$lifecycle"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"


    //my libs
    implementation "com.github.FunkyMuse.KAHelpers:viewbinding:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:kotlinextensions:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:coroutines:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:customviews:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:recyclerview:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:security:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:biometrics:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:dateTime:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:toaster:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:database:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:view:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:common:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:accessibility:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:collections:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:string:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:locale:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:context:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:contextGetters:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:fragment:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:intent:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:root:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:sharedpreferences:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:animations:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:color:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:receivers:$utilsVersion"
    implementation "com.github.FunkyMuse.KAHelpers:lifecycle:$utilsVersion"
    implementation "com.github.FunkyMuse:Crashy:$crashyVersion"

    //sql cipher
    implementation "net.zetetic:android-database-sqlcipher:4.5.4"
    implementation "androidx.sqlite:sqlite-ktx:2.4.0"

    implementation "androidx.room:room-ktx:$room_version"
    implementation "androidx.room:room-paging:$room_version"
    kapt "androidx.room:room-compiler:$room_version"

    //cameraX
    implementation "androidx.camera:camera-camera2:$camerax_version"

    //paging
    implementation "androidx.paging:paging-runtime-ktx:$paging_version"

    //work
    implementation "androidx.work:work-runtime-ktx:$work_version"

}