import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    `kotlin-dsl`
}

group = "com.zaojiao.app.built"

java {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

tasks.withType<KotlinCompile>().configureEach {
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_11.toString()
    }
}

dependencies {
    compileOnly(libs.android.gradle)
    compileOnly(libs.kotlin.gradle)
    compileOnly(libs.ksp.gradle)
}

gradlePlugin {
    plugins {
        register("application") {
            id = "d.convention.application"
            implementationClass = "ApplicationConventionPlugin"
        }

        register("library") {
            id = "d.convention.library"
            implementationClass = "LibraryConventionPlugin"
        }

        register("compose") {
            id = "d.convention.compose"
            implementationClass = "ComposeConventionPlugin"
        }

        register("hilt") {
            id = "d.convention.hilt"
            implementationClass = "HiltConventionPlugin"
        }
    }
}