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

class HiltConventionPlugin : Plugin<Project> {
    override fun apply(target: Project) {
        with(target) {
            with(pluginManager) {
                apply("dagger.hilt.android.plugin")
                apply("org.jetbrains.kotlin.kapt")
                apply("com.google.dagger.hilt.android")
            }

            dependencies {
                add("implementation", "com.google.dagger:dagger:2.44.2")
                add("kapt", "com.google.dagger:dagger-compiler:2.44.2")

                add("implementation", "com.google.dagger:hilt-android:2.44.2")
                add("kapt", "com.google.dagger:hilt-android-compiler:2.44.2")
            }
        }
    }

}