From cb287e46eb2137d46d34ab63345d1e3bab05e51c Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 11 Jan 2022 14:33:05 +0100 Subject: [PATCH] Prevent build of empty root jar --- build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.gradle b/build.gradle index b205ae2..e37be14 100644 --- a/build.gradle +++ b/build.gradle @@ -42,6 +42,12 @@ allprojects { } } + // Only generate jar for submodules + // https://stackoverflow.com/a/25445035 + jar { + onlyIf { !sourceSets.main.allSource.files.isEmpty() } + } + // checkstyle checkstyle { toolVersion = '8.18'