From b3620d8cfc2cadfbff168f713389b5e3d613e895 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Thu, 17 Dec 2015 18:10:40 +1100 Subject: [PATCH] Added existence check for libs directory --- build.gradle | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 31b5c156b..edbf494f7 100644 --- a/build.gradle +++ b/build.gradle @@ -117,14 +117,17 @@ uploadArchives { def list = [] def dir = new File("build/libs/") - dir.eachFileRecurse (FileType.FILES) { file -> - //Add each file to the list - list << file - } - //Print the names of all of the output files - list.each { - println it.getName() + if (dir.exists() { + dir.eachFileRecurse (FileType.FILES) { file -> + //Add each file to the list + list << file + } + + //Print the names of all of the output files + list.each { + println it.getName() + } } println "--------------------"