Android - JNI开发中Gradle的配置

Andoid - JNI.NDKHelloWorld

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dependencies {
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
}
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)
}
Gavin Liu wechat
欢迎您扫一扫上面的二维码,订阅我的微信公众号!