From ec0ef0509a50f76bcad8774247c2e5541d2122f1 Mon Sep 17 00:00:00 2001 From: mhutti1 Date: Thu, 27 Jul 2017 20:03:18 +0100 Subject: [PATCH] Only copy embedded content to built architectures --- app/build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fdee583f3..4f135ebe9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,6 +27,8 @@ repositories { jcenter() } +String[] archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64'] + dependencies { // Get kiwixlib online if it is not populated locally @@ -34,6 +36,7 @@ dependencies { compile 'org.kiwix.kiwixlib:kiwixlib:0.0.4' } else { compile project(':kiwixlib') + archs = file("../kiwixlib/src/main/jniLibs").list() } // Storage Devices @@ -131,8 +134,6 @@ if(custom.listFiles()) { } } -def archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64'] - android { compileSdkVersion 25 buildToolsVersion '25.0.2' @@ -216,7 +217,7 @@ android { def sourceFile = file(directory + "/" + parsedJson.zim_file) if (parsedJson.embed_zim) { // Place content in each lib directory for embeded zims - archs.forEach() { archName -> + for (String archName : archs) { copy { from sourceFile into file(directory + "/jniLibs/" + archName)