From 61ec22a88bd89e0b134421fcde33c270df2e6064 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 5 Sep 2017 10:42:31 +0200 Subject: [PATCH] Support absolute path when specifying zim_file in info.json for custom app. Test if the zim_file path is existing. If yes, it is used as it is. If not, we assume it is a local path relative to the custom directory (as before). --- app/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 0ea143cf4..dbe8c850a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -242,7 +242,10 @@ android { jsonFile = file(directory + '/info.json') } def parsedJson = new JsonSlurper().parseText(jsonFile.text) - def sourceFile = file(directory + "/" + parsedJson.zim_file) + def sourceFile = file(parsedJson.zim_file) + if (!sourceFile.exists()) { + sourceFile = file(directory + "/" + parsedJson.zim_file) + } if (parsedJson.embed_zim) { // Place content in each lib directory for embeded zims for (String archName : archs) {