plugins { `java-base` id("com.diffplug.spotless") } val copyright = "// Copyright © \$YEAR Caleb Cushing.\n" val javaLicense = "// SPDX-License-Identifier: Apache-2.0\n" val gradleLicense = "// SPDX-License-Identifier: MIT\n" spotless { if (!providers.environmentVariable("CI").isPresent) { ratchetFrom("origin/main") } java { licenseHeader(javaLicense + copyright) removeUnusedImports() // formatAnnotations() // cleanthat() } kotlinGradle { target("**/*.gradle.kts") targetExclude("**/build/**") licenseHeader(gradleLicense + copyright, "(import|buildscript|plugins|root)") // ktlint() } } val libs = the() dependencies { // spotless(libs.ktlint) }