From f8163545ebf5bc5b1e4bd2834cd00b7978166db3 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Fri, 19 Apr 2019 19:09:04 +0200 Subject: [PATCH] Workaround for build failure when building from a clean source tree. The build fails when building from a clean source tree, because the CuckooChessEngine.jar file does not exist. This commit adds a workaround, but you have to build twice to get the CuckooChess.jar file to be built. --- CuckooChess/build.gradle | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CuckooChess/build.gradle b/CuckooChess/build.gradle index 146978f..f2bfc60 100644 --- a/CuckooChess/build.gradle +++ b/CuckooChess/build.gradle @@ -1,10 +1,12 @@ apply plugin: 'java-library' -jar { - manifest { - attributes "Main-Class": "tui.Main" - } - from zipTree('../CuckooChessEngine/build/libs/CuckooChessEngine.jar') +if (project.file('../CuckooChessEngine/build/libs/CuckooChessEngine.jar').exists()) { + jar { + manifest { + attributes "Main-Class": "tui.Main" + } + from zipTree('../CuckooChessEngine/build/libs/CuckooChessEngine.jar') + } } dependencies {