From a76ed53ee782c4d2be6e93fb18cd0c32834359c3 Mon Sep 17 00:00:00 2001 From: OmerBenGera Date: Fri, 12 Aug 2022 14:16:39 +0300 Subject: [PATCH] [CI SKIP] Added debug messages check when building project --- build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.gradle b/build.gradle index 05cd530..c154d69 100644 --- a/build.gradle +++ b/build.gradle @@ -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 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 } }