Skip to content

Commit

Permalink
Download kiwixlib from jcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutti1 committed Aug 2, 2017
1 parent b442edb commit 958d217
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 199 deletions.
34 changes: 22 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ repositories {
}

dependencies {
// Kiwixlib
compile project(":kiwixlib")

// Get kiwixlib online if it is not populated locally
if (file("../kiwixlib/src/main").list().length == 1) {
compile 'org.kiwix.kiwixlib:kiwixlib:0.0.4'
} else {
compile project(':kiwixlib')
}

// Storage Devices
compile 'eu.mhutti1.utils.storage:android-storage-devices:0.6.2'
Expand Down Expand Up @@ -126,6 +131,8 @@ if(custom.listFiles()) {
}
}

def archs = ['arm64-v8a', 'armeabi', 'mips', 'mips64', 'x86', 'x86_64']

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
Expand Down Expand Up @@ -208,16 +215,15 @@ android {
def parsedJson = new JsonSlurper().parseText(jsonFile.text)
def sourceFile = file(directory + "/" + parsedJson.zim_file)
if (parsedJson.embed_zim) {

// Place content in each lib directory for embeded zims
file("../kiwixlib/src/main/jniLibs").eachDir() { folder ->
copy {
from sourceFile
into file(directory + "/jniLibs/" + folder.name)
rename { String filename -> "libcontent.so" }
}
}
parsedJson.zim_file = "libcontent.so"
// Place content in each lib directory for embeded zims
archs.forEach() { archName ->
copy {
from sourceFile
into file(directory + "/jniLibs/" + archName)
rename { String filename -> "libcontent.so" }
}
}
parsedJson.zim_file = "libcontent.so"
}
// Set custom config from json
applicationId "$parsedJson.package"
Expand Down Expand Up @@ -305,6 +311,10 @@ task wrapper(type: Wrapper) {
// Testdroid deployment configuration
def buildNumber = System.getenv('TRAVIS_BUILD_NUMBER')

def findJar(prefix) {
configurations.runtime.filter { it.name.startsWith(prefix) }
}

testdroid {
authorization "APIKEY"
apiKey System.getenv('BITBAR_API_KEY')
Expand Down
1 change: 0 additions & 1 deletion kiwixlib/.gitignore

This file was deleted.

Empty file added kiwixlib/libs/.gitkeep
Empty file.
25 changes: 0 additions & 25 deletions kiwixlib/proguard-rules.pro

This file was deleted.

5 changes: 1 addition & 4 deletions kiwixlib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
package="kiwix.org.kiwixlib"
>

<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>
<application>

</application>

Expand Down
77 changes: 0 additions & 77 deletions kiwixlib/src/main/java/org/kiwix/kiwixlib/JNIKiwix.java

This file was deleted.

25 changes: 0 additions & 25 deletions kiwixlib/src/main/java/org/kiwix/kiwixlib/JNIKiwixBool.java

This file was deleted.

26 changes: 0 additions & 26 deletions kiwixlib/src/main/java/org/kiwix/kiwixlib/JNIKiwixInt.java

This file was deleted.

25 changes: 0 additions & 25 deletions kiwixlib/src/main/java/org/kiwix/kiwixlib/JNIKiwixString.java

This file was deleted.

Binary file removed kiwixlib/src/main/jniLibs/arm64-v8a/libkiwix.so
Binary file not shown.
Binary file removed kiwixlib/src/main/jniLibs/armeabi/libkiwix.so
Binary file not shown.
Binary file removed kiwixlib/src/main/jniLibs/mips/libkiwix.so
Binary file not shown.
Binary file removed kiwixlib/src/main/jniLibs/mips64/libkiwix.so
Binary file not shown.
Binary file removed kiwixlib/src/main/jniLibs/x86/libkiwix.so
Binary file not shown.
Binary file removed kiwixlib/src/main/jniLibs/x86_64/libkiwix.so
Binary file not shown.
3 changes: 0 additions & 3 deletions kiwixlib/src/main/res/values/strings.xml

This file was deleted.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app', ':kiwixlib'
include ':app', ':kiwixlib'

0 comments on commit 958d217

Please sign in to comment.