Skip to content

Instantly share code, notes, and snippets.

@showsky
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save showsky/8858593 to your computer and use it in GitHub Desktop.

Select an option

Save showsky/8858593 to your computer and use it in GitHub Desktop.
How to bundle *.so to APK use Gradle or Android studio
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(JavaCompile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment