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.
This commit is contained in:
Peter Osterlund
2019-04-19 19:09:04 +02:00
parent 23b6f94678
commit f8163545eb

View File

@@ -1,11 +1,13 @@
apply plugin: 'java-library' apply plugin: 'java-library'
if (project.file('../CuckooChessEngine/build/libs/CuckooChessEngine.jar').exists()) {
jar { jar {
manifest { manifest {
attributes "Main-Class": "tui.Main" attributes "Main-Class": "tui.Main"
} }
from zipTree('../CuckooChessEngine/build/libs/CuckooChessEngine.jar') from zipTree('../CuckooChessEngine/build/libs/CuckooChessEngine.jar')
} }
}
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')