Only copy embedded content to built architectures

This commit is contained in:
mhutti1 2017-07-27 20:03:18 +01:00 committed by Isaac Hutt
parent 1ba530d2cb
commit ec0ef0509a

View File

@ -27,6 +27,8 @@ repositories {
jcenter() jcenter()
} }
String[] archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64']
dependencies { dependencies {
// Get kiwixlib online if it is not populated locally // Get kiwixlib online if it is not populated locally
@ -34,6 +36,7 @@ dependencies {
compile 'org.kiwix.kiwixlib:kiwixlib:0.0.4' compile 'org.kiwix.kiwixlib:kiwixlib:0.0.4'
} else { } else {
compile project(':kiwixlib') compile project(':kiwixlib')
archs = file("../kiwixlib/src/main/jniLibs").list()
} }
// Storage Devices // Storage Devices
@ -131,8 +134,6 @@ if(custom.listFiles()) {
} }
} }
def archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64']
android { android {
compileSdkVersion 25 compileSdkVersion 25
buildToolsVersion '25.0.2' buildToolsVersion '25.0.2'
@ -216,7 +217,7 @@ android {
def sourceFile = file(directory + "/" + parsedJson.zim_file) def sourceFile = file(directory + "/" + parsedJson.zim_file)
if (parsedJson.embed_zim) { if (parsedJson.embed_zim) {
// Place content in each lib directory for embeded zims // Place content in each lib directory for embeded zims
archs.forEach() { archName -> for (String archName : archs) {
copy { copy {
from sourceFile from sourceFile
into file(directory + "/jniLibs/" + archName) into file(directory + "/jniLibs/" + archName)