Doesn't set up flavours for each custom app if the custom app directory doesnt exist.

This commit is contained in:
nomisto 2017-05-05 20:56:32 +02:00 committed by Isaac Hutt
parent e82dec33cf
commit 50e2ba6d83

View File

@ -116,13 +116,15 @@ if (project.hasProperty('customDir')) {
} }
// Set up flavours for each custom app in the directory // Set up flavours for each custom app in the directory
custom.eachFile() { file -> if(custom.listFiles()) {
custom.eachFile() { file ->
def fileName = file.getName() def fileName = file.getName()
if (fileName.contains("test") || fileName == "main" || fileName.contains("Test")) { if (fileName.contains("test") || fileName == "main" || fileName.contains("Test")) {
return return
}
map.put(fileName, file.getAbsolutePath())
} }
map.put(fileName, file.getAbsolutePath())
} }
android { android {