Created
June 15, 2013 15:40
-
-
Save julianshen/5788510 to your computer and use it in GitHub Desktop.
Include native lib in gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task copyNativeLibs(type: Copy) { | |
from fileTree(dir: 'jni', include: '**/*.so' ) into 'build/native-libs' | |
} | |
tasks.withType(Compile) { compileTask -> compileTask.dependsOn copyNativeLibs } | |
clean.dependsOn 'cleanCopyNativeLibs' | |
tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask -> | |
pkgTask.jniDir file('build/native-libs') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment