build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. android {
  5. compileSdk rootProject.ext.android.compileSdk
  6. buildToolsVersion rootProject.ext.android.buildToolsVersion
  7. defaultConfig {
  8. minSdk rootProject.ext.android.minSdk
  9. targetSdk rootProject.ext.android.targetSdk
  10. externalNativeBuild {
  11. cmake {
  12. cppFlags '-std=c++11 -frtti -fexceptions -lz'
  13. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  14. }
  15. }
  16. ndk {
  17. // 设置支持的SO库架构
  18. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  19. }
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled rootProject.ext.module.minifyEnabled
  24. proguardFiles 'proguard-rules.pro'
  25. }
  26. }
  27. buildFeatures {
  28. buildConfig false
  29. }
  30. lintOptions {
  31. abortOnError false
  32. }
  33. dexOptions {
  34. preDexLibraries false
  35. }
  36. externalNativeBuild {
  37. cmake {
  38. path "CMakeLists.txt"
  39. }
  40. }
  41. }
  42. dependencies {
  43. api project(':library_base')
  44. }
  45. android.libraryVariants.all { variant ->
  46. if (variant.buildType.name == 'release'){
  47. variant.outputs.all {
  48. outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
  49. }
  50. }else{
  51. variant.outputs.all {
  52. outputFileName = "$PUBLISH_ARTIFACT_ID" + "_"+ variant.buildType.name + "$PUBLISH_VERSION" + ".aar"
  53. }
  54. }
  55. }
  56. ext {
  57. PUBLISH_ARTIFACT_ID = 'yyxx_comm_core'
  58. PUBLISH_VERSION = ':3.0.100'
  59. }
  60. apply from: 'buildJar.gradle'