Skip to content

Commit

Permalink
Merge pull request #121 from binaryking/master
Browse files Browse the repository at this point in the history
Fix crash due to UnsatisfiedLinkError on all devices.
  • Loading branch information
droidchef committed Dec 20, 2014
2 parents b2edb00 + cc540ba commit 5388358
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions mifosng-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,31 @@ android {
}
}

task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') {
destinationDir file("$buildDir/native-libs")
baseName 'native-libs'
extension 'jar'
from fileTree(dir: 'src/main/libs', include: '**/*.so')
into 'lib/'
}

task buildAndEMailAPK(type: Exec, description: 'Builds and Generates a Signed APK and emails it'){


}

task copyNativeLibs(type: Copy) {
from(new File(getProjectDir(), 'src/main/libs')) { include '**/*.so' }
into new File(buildDir, 'native-libs')
}

tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
compileTask ->
compileTask.dependsOn(copyNativeLibs)
}

clean.dependsOn('cleanCopyNativeLibs')

tasks.withType(com.android.build.gradle.tasks.PackageApplication) {
pkgTask ->
pkgTask.jniFolders = new HashSet<File>()
pkgTask.jniFolders.add(new File(buildDir, 'native-libs'))
}

dependencies {
compile fileTree(dir: 'src/main/libs', include: ['*.jar'])
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')

// You must install or update the Support Repository through the SDK manager to use this dependency.
// You must install or update the Google Repository through the SDK manager to use this dependency.
Expand Down

0 comments on commit 5388358

Please sign in to comment.