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

This commit is contained in:
Jason Penilla
2022-06-27 15:41:59 -07:00
parent c75561a354
commit 03335ed6fe
4 changed files with 68 additions and 2 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)
}