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

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    ext {
        kotlin_version = '1.9.10'
        ksp_version = '1.9.10-1.0.13'
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.1.2'
        classpath 'com.google.gms:google-services:4.4.0'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
        classpath "com.google.devtools.ksp:symbol-processing-api:$ksp_version"
        classpath "com.google.devtools.ksp:symbol-processing-gradle-plugin:$ksp_version"
    }
}

tasks.register('clean', Delete) {
    delete getLayout().getBuildDirectory()
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions {
        freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
    }
}
