Skip to content

Instantly share code, notes, and snippets.

@xalexchen
Created September 12, 2013 06:46
Show Gist options
  • Save xalexchen/6533747 to your computer and use it in GitHub Desktop.
Save xalexchen/6533747 to your computer and use it in GitHub Desktop.
copy android so library into apk on android stuido
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: 'libs', include: '**/*.so')
into 'lib/'
}
tasks.withType(Compile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment