import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

class NavigationConventionPlugin : Plugin<Project> {
    override fun apply(target: Project) {
        with(target) {
            with(pluginManager) {
                apply("org.jetbrains.kotlin.kapt")
                apply("androidx.navigation.safeargs.kotlin")
            }

            dependencies {
                add("implementation", "androidx.navigation:navigation-ui-ktx:2.6.0")
                add("implementation", "androidx.navigation:navigation-compose:2.6.0")
                add("implementation", "androidx.hilt:hilt-navigation-compose:1.0.0")
                add("implementation", "androidx.hilt:hilt-navigation-fragment:1.0.0")
                add("kapt", "androidx.hilt:hilt-compiler:1.0.0")
            }
        }
    }
}