build.gradle 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. id 'kotlin-kapt'
  5. id 'kotlin-parcelize'
  6. }
  7. android {
  8. namespace 'com.zhyc.lib_base'
  9. compileSdk rootProject.ext.android.compileSdk
  10. defaultConfig {
  11. minSdk rootProject.ext.android.minSdk
  12. targetSdk rootProject.ext.android.targetSdk
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. consumerProguardFiles "consumer-rules.pro"
  15. ndk {
  16. //选择要添加的对应 cpu 类型的 .so 库
  17. abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
  18. // 还可以添加 'x86', , 'mips', 'mips64'
  19. }
  20. manifestPlaceholders = [
  21. JPUSH_PKGNAME : "com.zhyc.xapp",
  22. JPUSH_APPKEY : "c5572e5a4e9b3da2ac4332ee", //JPush 上注册的包名对应的 AppKey.
  23. JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
  24. MEIZU_APPKEY : "MZ-魅族的APPKEY",
  25. MEIZU_APPID : "MZ-魅族的APPID",
  26. XIAOMI_APPID : "MI-小米的APPID",
  27. XIAOMI_APPKEY : "MI-小米的APPKEY",
  28. OPPO_APPKEY : "OP-oppo的APPKEY",
  29. OPPO_APPID : "OP-oppo的APPID",
  30. OPPO_APPSECRET : "OP-oppo的APPSECRET",
  31. VIVO_APPID : "105618902",
  32. VIVO_APPKEY : "58b5042a8960c6302c217534496c5d03",
  33. HONOR_APPID : "honorAppid"
  34. ]
  35. // ARouter配置
  36. kapt {
  37. arguments {
  38. arg("AROUTER_MODULE_NAME", project.getName())
  39. }
  40. }
  41. }
  42. buildTypes {
  43. release {
  44. minifyEnabled false
  45. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  46. }
  47. }
  48. compileOptions {
  49. sourceCompatibility JavaVersion.VERSION_1_8
  50. targetCompatibility JavaVersion.VERSION_1_8
  51. }
  52. kotlinOptions {
  53. jvmTarget = '1.8'
  54. }
  55. buildFeatures {
  56. dataBinding true
  57. viewBinding true
  58. }
  59. }
  60. dependencies {
  61. implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  62. api rootProject.ext.dependencies.coreKtx
  63. api rootProject.ext.dependencies.appcompat
  64. api rootProject.ext.dependencies.material
  65. api rootProject.ext.dependencies.constraintlayout
  66. api rootProject.ext.dependencies.junit
  67. api rootProject.ext.dependencies.junitExt
  68. api rootProject.ext.dependencies.espresso
  69. // jetpack
  70. api rootProject.ext.dependencies.viewModelKtx
  71. api rootProject.ext.dependencies.liveDataKtx
  72. // UI相关
  73. api rootProject.ext.dependencies.smartRefreshCore
  74. api rootProject.ext.dependencies.smartRefreshHeader
  75. api rootProject.ext.dependencies.smartRefreshFooter
  76. api rootProject.ext.dependencies.recyclerview
  77. api rootProject.ext.dependencies.BaseRecyclerViewAdapterHelper
  78. api rootProject.ext.dependencies.materialDialogsCore
  79. api rootProject.ext.dependencies.materialDialogsLifecycle
  80. api rootProject.ext.dependencies.materialDialogsbottomsheets
  81. // immersionbar
  82. api rootProject.ext.dependencies.immersionbar
  83. api rootProject.ext.dependencies.immersionbar_ktx
  84. // web
  85. api rootProject.ext.dependencies.agentWeb
  86. api rootProject.ext.dependencies.agentWeb_filechooser
  87. api rootProject.ext.dependencies.agentWeb_downloader
  88. // 轮播图 https://github.com/youth5201314/banner
  89. api rootProject.ext.dependencies.banner
  90. api rootProject.ext.dependencies.flexbox
  91. // 存储相关
  92. api rootProject.ext.dependencies.mmkv
  93. // 图片
  94. api rootProject.ext.dependencies.glide
  95. api rootProject.ext.dependencies.picture_selector
  96. api rootProject.ext.dependencies.picture_compress
  97. api rootProject.ext.dependencies.picture_ucrop
  98. api rootProject.ext.dependencies.picture_camerax
  99. // 网络相关
  100. api rootProject.ext.dependencies.retrofit
  101. api rootProject.ext.dependencies.converterGson
  102. api rootProject.ext.dependencies.loggingInterceptor
  103. api rootProject.ext.dependencies.PersistentCookieJar
  104. // Camerax x
  105. api rootProject.ext.dependencies.mnmlKitScaner
  106. api rootProject.ext.dependencies.camerax
  107. api rootProject.ext.dependencies.camerax_lifecycle
  108. api rootProject.ext.dependencies.camerax_view
  109. api rootProject.ext.dependencies.barcode_scanning
  110. // ARouter路由
  111. api rootProject.ext.dependencies.arouter_api
  112. // Permission-X
  113. api rootProject.ext.dependencies.permissionx
  114. // bugly
  115. api rootProject.ext.dependencies.bugly_update
  116. api rootProject.ext.dependencies.bugly_nativecrashreport
  117. // multidex
  118. api rootProject.ext.dependencies.multidex
  119. // 使用debugApi只在调试时引入
  120. debugApi rootProject.ext.dependencies.leakcanary
  121. // 此处以JCore 4.0.0 版本为例
  122. implementation 'cn.jiguang.sdk:jcore:4.0.0'
  123. // 此处以JPush 4.8.5 版本为例
  124. implementation 'cn.jiguang.sdk:jpush:4.8.5'
  125. //若不集成厂商通道,可直接跳过以下依赖
  126. // 极光厂商插件版本与接入 JPush 版本保持一致,下同
  127. // 接入华为厂商
  128. implementation 'com.huawei.hms:push:6.5.0.300'
  129. implementation 'cn.jiguang.sdk.plugin:huawei:4.8.5'
  130. // 接入 FCM 厂商
  131. implementation 'com.google.firebase:firebase-messaging:23.0.5'
  132. implementation 'cn.jiguang.sdk.plugin:fcm:4.8.5'
  133. // 接入魅族厂商
  134. implementation 'cn.jiguang.sdk.plugin:meizu:4.8.5'
  135. // 接入 VIVO 厂商
  136. implementation 'cn.jiguang.sdk.plugin:vivo:4.8.5'
  137. // 接入小米厂商
  138. implementation 'cn.jiguang.sdk.plugin:xiaomi:4.8.5'
  139. // 接入 OPPO 厂商
  140. implementation 'cn.jiguang.sdk.plugin:oppo:4.8.5'
  141. }
  142. apply plugin: 'com.google.gms.google-services'
  143. apply plugin: 'com.huawei.agconnect'