12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- apply plugin: 'com.android.library'
- android {
- compileSdkVersion cfgs.compileSdkVersion
- defaultConfig {
- minSdkVersion cfgs.minSdkVersion
- targetSdkVersion cfgs.targetSdkVersion
- consumerProguardFiles 'consumer-proguard-rules.pro'
- }
- def isBuildSo = false
- if (isBuildSo) { // 构建生成 so 文件
- sourceSets {
- main {
- jniLibs.srcDirs = []
- }
- }
- externalNativeBuild {
- ndkBuild {
- path 'src/main/jni/Android.mk'
- }
- }
- } else { // 生成 so 文件后,打包时直接使用生成的 so
- sourceSets {
- main {
- jni.srcDirs = []
- }
- }
- delete(file('.externalNativeBuild'), file('src/main/libs'), file('src/main/obj'))
- }
- packagingOptions { //避免重复导入库
- exclude 'lib/mips/libiconv.so'
- exclude 'lib/x86/libiconv.so'
- exclude 'lib/x86_64/libiconv.so'
- exclude 'lib/armeabi-v7a/libiconv.so'
- exclude 'lib/armeabi/libiconv.so'
- exclude 'lib/mips64/libiconv.so'
- exclude 'lib/arm64-v8a/libiconv.so'
- }
- }
- dependencies {
- // if (hasProperty("publishAar")) {
- // implementation "cn.bingoogolapple:bga-qrcode-core:${VERSION_NAME}"
- // } else {
- // api project(':qrcodecore')
- // }
- api project(':BSQrcodecore')
- implementation "androidx.appcompat:appcompat:${cfgs.appcompat_version}"
- implementation "androidx.legacy:legacy-support-v4:$cfgs.legacySupport"
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- testImplementation 'junit:junit:4.12'
- }
- // ./gradlew :zbar:clean :zbar:build :zbar:bintrayUpload -PpublishAar
- if (hasProperty("publishAar")) {
- apply from: 'https://raw.githubusercontent.com/bingoogolapple/PublishAar/master/jcenter-release.gradle'
- }
- tasks.whenTaskAdded {
- if (it.name == 'releaseAndroidJavadocs') {
- it.enabled = false
- }
- }
|