android {

    defaultConfig {
        applicationId "com.funkymuse.aurora"

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

    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'
        }
    }

    kapt {
        correctErrorTypes = true
        useBuildCache = true
    }

    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
            excludes += 'META-INF/DEPENDENCIES'
        }
    }
}

hilt { enableAggregatingTask = true }
enableBuildConfig(this)
applyRoomDeps(this)
applyHiltDeps(this)
applyMoshiDeps(this)
applyComposeUIDeps(this)
applyCoilDep(this)
applyWorkerDeps(this)

dependencies {
    //navigation
    implementation project(path: ':navigator')

    //style
    implementation project(path: ':style:theme')
    implementation project(path: ':style:shape')

    implementation project(path: ':resources:colors')

    //search
    implementation project(path: ':search:searchui')
    implementation project(path: ':search:searchdata')

    //search result
    implementation project(path: ':searchresult:searchresultui')
    implementation project(path: ':searchresult:searchresultdestination')

    //search filter
    implementation project(path: ':search:searchfilter:searchfilterui')
    implementation project(path: ':search:searchfilter:searchfilterdestination')

    //favorites
    implementation project(path: ':favoritebook:favoritebookui')

    //latest books
    implementation project(path: ':latestbooks:latestbooksui')

    //book details
    implementation project(path: ':bookdetails:bookdetailsui')
    implementation project(path: ':bookdetails:bookdetailsdestination')

    //downloads
    implementation project(path: ':downloads:downloadsui')
    implementation project(path: ':downloads:downloadsdestination')

    //settings
    implementation project(path: ':settings:settingsui')
    implementation project(path: ':settings:settingsdata')

    //coroutines
    implementation project(path: ':coroutines:appscope')

    //crashes
    implementation project(path: ':crashes:crashesui')
    implementation project(path: ':crashes:crashesdestination')

    //donations
    implementation project(path: ':donations:donationsui')
    implementation project(path: ':donations:donationsdestination')
    implementation project(path: ':donations:explanation:donationsexplanationdestination')
    implementation project(path: ':donations:explanation:donationsexplanationui')

    //material
    implementation 'com.google.android.material:material:1.12.0-alpha03'

    //runCodeEveryXLaunch
    implementation project(path: ':common:runCodeEveryXLaunch')

    //extensions
    implementation project(path: ':common:composeextensions')

    //oneTimePref
    implementation project(path: ':common:onetimepreferences')

    //helpers
    implementation "com.github.FunkyMuse.KAHelpers:coroutines:$KAHelpers"
    implementation "com.github.FunkyMuse:Composed:$composed"
    implementation "androidx.core:core-ktx:$coreKTX"
    implementation "androidx.compose.runtime:runtime-livedata:$compose_version"

    //crashy
    implementation "com.github.FunkyMuse:Crashy:$crashy"

    //compose
    implementation "androidx.compose.material:material-icons-extended:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.activity:activity-compose:$activity"

    //navigation
    implementation "androidx.navigation:navigation-compose:$navigation"
    implementation project(path: ':bottomnavigation')

    //accompanist
    implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist"
    implementation "com.google.accompanist:accompanist-navigation-material:$accompanist"

    //hilt jetpack
    implementation "androidx.hilt:hilt-navigation-compose:$hilt_navigation_compose"
    kapt "androidx.hilt:hilt-compiler:$hiltJetpackVersion"

    //test
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

}