apply plugin: 'com.android.library'
|
|
android {
|
compileSdkVersion 27
|
|
|
|
defaultConfig {
|
namespace("com.anyun.libusbcamera")
|
minSdkVersion 21
|
targetSdkVersion 26
|
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
externalNativeBuild {
|
cmake {
|
arguments "-DANDROID_ARM_NEON=TRUE","-DANDROID_STL=c++_shared"
|
cppFlags ""
|
}
|
}
|
ndk {
|
// Specifies the ABI configurations of your native
|
// libraries Gradle should build and package with your APK.
|
abiFilters "arm64-v8a","armeabi-v7a"
|
}
|
}
|
|
buildTypes {
|
release {
|
minifyEnabled false
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
}
|
}
|
externalNativeBuild {
|
cmake {
|
path "CMakeLists.txt"
|
}
|
}
|
|
packagingOptions {
|
// pickFirsts:当出现重复文件,会使用第一个匹配的文件打包进入apk
|
pickFirst 'lib/armeabi-v7a/libjpeg.so'
|
pickFirst 'lib/armeabi-v7a/libturbojpeg.so'
|
pickFirst 'lib/arm64-v8a/libjpeg.so'
|
pickFirst 'lib/arm64-v8a/libturbojpeg.so'
|
pickFirst 'lib/*/libc++_shared.so'
|
|
}
|
|
}
|
|
dependencies {
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
testImplementation 'junit:junit:4.12'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
}
|