1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- plugins {
- id 'com.android.library'
- }
- android {
- compileSdk rootProject.ext.android.compileSdk
- buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdk rootProject.ext.android.minSdk
- targetSdk rootProject.ext.android.targetSdk
- externalNativeBuild {
- cmake {
- cppFlags '-std=c++11 -frtti -fexceptions -lz'
- abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
- }
- }
- ndk {
- // 设置支持的SO库架构
- abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
- }
- }
- buildTypes {
- release {
- minifyEnabled rootProject.ext.module.minifyEnabled
- proguardFiles 'proguard-rules.pro'
- }
- }
- buildFeatures {
- buildConfig false
- }
- lintOptions {
- abortOnError false
- }
- dexOptions {
- preDexLibraries false
- }
- externalNativeBuild {
- cmake {
- path "CMakeLists.txt"
- }
- }
- }
- dependencies {
- compileOnly project(':library_base')
- }
- android.libraryVariants.all { variant ->
- if (variant.buildType.name == 'release'){
- variant.outputs.all {
- outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
- }
- }else{
- variant.outputs.all {
- outputFileName = "$PUBLISH_ARTIFACT_ID" + "_"+ variant.buildType.name + "$PUBLISH_VERSION" + ".aar"
- }
- }
- }
- apply from: 'publish.gradle'
|