[ci skip] Scan built jars for bad method usages (#8051)

This commit is contained in:
Jason 2022-06-27 15:41:59 -07:00 committed by GitHub
parent 0d79b867e5
commit 1bd678c494
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 5 deletions

View file

@ -25,3 +25,12 @@ configure<PublishingExtension> {
from(components["java"])
}
}
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJar)
}