build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. apply plugin: 'com.android.application'
  2. def cfg = rootProject.ext.configuration
  3. def lib = rootProject.ext.libraries
  4. android {
  5. compileSdkVersion cfg.compileSdkVersion
  6. defaultConfig {
  7. minSdkVersion cfg.minSdkVersion
  8. targetSdkVersion cfg.targetSdkVersion
  9. versionCode cfg.versionCode
  10. versionName cfg.versionName
  11. testInstrumentationRunner "android.support.activity_about.runner.AndroidJUnitRunner"
  12. multiDexEnabled true
  13. javaCompileOptions {
  14. annotationProcessorOptions {
  15. arguments = [AROUTER_MODULE_NAME: project.getName()]
  16. }
  17. }
  18. // splits {
  19. // abi {
  20. // enable true
  21. // reset()
  22. // include 'x86', 'armeabi-v7a','x86_64'
  23. // universalApk true
  24. // }
  25. // }
  26. /* ndk {
  27. // 设置支持的SO库架构
  28. abiFilters 'armeabi', 'x86_64', 'armeabi-v7a', 'x86', 'arm64-v8a'
  29. }*/
  30. ndk {
  31. //选择要添加的对应 cpu 类型的 .so 库。
  32. abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64', 'mips', 'mips64'
  33. // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  34. }
  35. manifestPlaceholders = [
  36. JPUSH_PKGNAME : "com.fengzhan100.fz",
  37. JPUSH_APPKEY : "22af32325a2be30bac993f5e", //JPush 上注册的包名对应的 Appkey.
  38. JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
  39. ]
  40. }
  41. packagingOptions {
  42. doNotStrip '*/mips/*.so'
  43. doNotStrip '*/mips64/*.so'
  44. }
  45. signingConfigs {
  46. release {
  47. keyAlias 'fengzhan'
  48. keyPassword 'fengzhan666'
  49. storeFile file('./fengzhan.jks')
  50. storePassword 'fengzhan666'
  51. }
  52. }
  53. buildTypes {
  54. debug {
  55. //是否混淆
  56. minifyEnabled false
  57. // 是否资源压缩
  58. shrinkResources false
  59. //是否移除无用资源
  60. zipAlignEnabled false
  61. signingConfig signingConfigs.release
  62. }
  63. release {
  64. //是否混淆
  65. minifyEnabled true
  66. // 是否资源压缩
  67. shrinkResources false
  68. //是否移除无用资源
  69. zipAlignEnabled false
  70. //混淆的配置文件
  71. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  72. signingConfig signingConfigs.release
  73. }
  74. }
  75. configurations.all {
  76. // resolutionStrategy.force 'com.google.zxing:core:3.3.0'
  77. resolutionStrategy.force "com.android.support:appcompat-v7:$lib.supportVersion"
  78. resolutionStrategy.force "com.android.support:design:$lib.supportVersion"
  79. }
  80. dexOptions {
  81. jumboMode true
  82. incremental true
  83. }
  84. aaptOptions {
  85. noCompress "tflite"
  86. noCompress "lite"
  87. }
  88. repositories {
  89. flatDir {
  90. dirs '../../android-new/BSOCR/libs'
  91. }
  92. }
  93. }
  94. dependencies {
  95. implementation fileTree(include: ['*.jar'], dir: 'libs')
  96. implementation "com.android.support:appcompat-v7:$lib.supportVersion"
  97. api 'com.android.support.constraint:constraint-layout:1.1.3'
  98. testImplementation 'junit:junit:4.12'
  99. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  100. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  101. configurations {
  102. all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  103. }
  104. //阿里路由
  105. annotationProcessor 'com.alibaba:arouter-compiler:1.2.2'
  106. api project(':BSBase')
  107. api project(':BSIndex')
  108. // if (!isDebugMine.toBoolean()) {
  109. api project(':BSMine')
  110. // }
  111. api project(':BSOCR')
  112. api project(':BSNotice')
  113. api project(':BSBaiduSpeak')
  114. }