For my latest project I needed a test that fails the build when my own build scripts use a
deprecated Gradle API, before Gradle 10 turns it into a hard error. Nothing I found did
exactly that, so I wrote it: gradle-deprecation-guard.

It runs the build once more with --warning-mode all, fails on any deprecation that is not
on the explicit allowlist (matched on message and plugin origin, so you don’t add code smell
to your own build scripts),and prints what it tolerated instead of hiding it. I think it might
also help you with indexing and better understanding your dependencies.

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        maven("https://codeberg.org/api/packages/brunier/maven")
        mavenCentral()
    }
}
// build.gradle.kts
dependencies { testImplementation("nl.brunier.testkit:gradle-deprecation-guard:1.0.0") }

Then subclass DeprecationGuardTest once in your tests and run ./gradlew test.

Repo: https://codeberg.org/brunier/gradle-deprecation-guard

Artifacts are PGP-signed, fingerprint 12E6 41A6 05F1 F550 1382 7510 6F68 3101 78C1 3CB9.
License: AGPL-3.0. Have fun with it.