[CI SKIP] Added debug messages check when building project

This commit is contained in:
OmerBenGera 2022-08-12 14:16:39 +03:00
parent 4dd84d53be
commit a76ed53ee7
1 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
import org.gradle.api.GradleException
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.0.0'
@ -35,7 +37,17 @@ allprojects {
compileOnly "com.bgsoftware.common.reflection:ReflectionUtils:latest"
}
task checkDebug() {
Set<File> filesWithDebug = fileTree('src/main/java').filter { file ->
file.text.contains('Bukkit.broadcastMessage')
}.getFiles()
if(!filesWithDebug.isEmpty())
throw new GradleException("Found debug messages: " + filesWithDebug)
}
build {
dependsOn checkDebug
dependsOn shadowJar
}
}