Repository: google/iosched
File: build.gradle.kts (Kotlin)

Code before:
        classpath("com.google.dagger:hilt-android-gradle-plugin:${Versions.HILT_AGP}")
    }
}

plugins {
    id("com.diffplug.gradle.spotless") version "3.27.1"
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()

        // For Android Build Server
        // - Material Design Components
        maven { url = uri("${project.rootDir}/../iosched-prebuilts/repository") }
        // - Other dependencies
        maven { url = uri("${project.rootDir}/../iosched-prebuilts/m2repository") }
        // - Support Libraries, etc
        maven {
            url = uri("${project.rootDir}/../../../prebuilts/fullsdk/linux/extras/support/m2repository")
        }
        // snapshot repository for androidx - not necessary once alpha is public
        maven {
            url = uri("https://androidx.dev/snapshots/builds/7352378/artifacts/repository")
        }

        flatDir {
            dirs = setOf(file("libs"), project(":ar").file("libs"))
        }
    }
}

subprojects {
    apply(plugin = "com.diffplug.gradle.spotless")
    val ktlintVer = "0.40.0"
    spotless {
        kotlin {
            target("**/*.kt")
            ktlint(ktlintVer).userData(
                mapOf("max_line_length" to "100", "disabled_rules" to "import-ordering")
            )
            licenseHeaderFile(project.rootProject.file("copyright.kt"))
        }
        kotlinGradle {
            // same as kotlin, but for .gradle.kts files (defaults to '*.gradle.kts')
            target("**/*.gradle.kts")
            ktlint(ktlintVer)
            licenseHeaderFile(project.rootProject.file("copyright.kt"), "(plugins |import |include)")
        }

Review comment (suggestion):
This is no longer necessary. This is now available on Google Maven. Replace `snapshot` with `alpha02`.

Code after:
        classpath("com.google.dagger:hilt-android-gradle-plugin:${Versions.HILT_AGP}")
    }
}

plugins {
    id("com.diffplug.gradle.spotless") version "3.27.1"
}

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()

        // For Android Build Server
        // - Material Design Components
        maven { url = uri("${project.rootDir}/../iosched-prebuilts/repository") }
        // - Other dependencies
        maven { url = uri("${project.rootDir}/../iosched-prebuilts/m2repository") }
        // - Support Libraries, etc
        maven {
            url = uri("${project.rootDir}/../../../prebuilts/fullsdk/linux/extras/support/m2repository")
        }

        flatDir {
            dirs = setOf(file("libs"), project(":ar").file("libs"))
        }
    }
}

subprojects {
    apply(plugin = "com.diffplug.gradle.spotless")
    val ktlintVer = "0.40.0"
    spotless {
        kotlin {
            target("**/*.kt")
            ktlint(ktlintVer).userData(
                mapOf("max_line_length" to "100", "disabled_rules" to "import-ordering")
            )
            licenseHeaderFile(project.rootProject.file("copyright.kt"))
        }
        kotlinGradle {
            // same as kotlin, but for .gradle.kts files (defaults to '*.gradle.kts')
            target("**/*.gradle.kts")
            ktlint(ktlintVer)
            licenseHeaderFile(project.rootProject.file("copyright.kt"), "(plugins |import |include)")
        }
    }

    // `spotlessCheck` runs when a build includes `check`, notably during presubmit. In these cases
    // we prefer `spotlessCheck` run as early as possible since it fails in seconds. This prevents a