build.gradle 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. android {
  6. compileSdk 32
  7. defaultConfig {
  8. minSdk 21
  9. targetSdk 32
  10. versionCode 1
  11. versionName "1.0"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. consumerProguardFiles "consumer-rules.pro"
  14. }
  15. buildTypes {
  16. release {
  17. minifyEnabled false
  18. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  19. }
  20. }
  21. compileOptions {
  22. sourceCompatibility JavaVersion.VERSION_1_8
  23. targetCompatibility JavaVersion.VERSION_1_8
  24. }
  25. }
  26. dependencies {
  27. implementation 'androidx.appcompat:appcompat:1.2.0'
  28. implementation 'com.google.android.material:material:1.3.0'
  29. implementation 'androidx.core:core-ktx:+'
  30. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
  31. testImplementation 'junit:junit:4.+'
  32. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  33. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  34. api fileTree(include: ['*.jar'], dir: 'libs')
  35. //support
  36. api rootProject.ext.support["support-v4"]
  37. api rootProject.ext.support["appcompat-v7"]
  38. api rootProject.ext.support["recyclerview-v7"]
  39. //rxjava
  40. api rootProject.ext.dependencies.rxjava
  41. api rootProject.ext.dependencies.rxandroid
  42. //rx管理View的生命周期
  43. api(rootProject.ext.dependencies.rxlifecycle) {
  44. exclude group: 'com.android.support'
  45. }
  46. api(rootProject.ext.dependencies["rxlifecycle-components"]) {
  47. exclude group: 'com.android.support'
  48. }
  49. //rxbinding
  50. api(rootProject.ext.dependencies.rxbinding) {
  51. exclude group: 'com.android.support'
  52. }
  53. //rx权限请求
  54. api(rootProject.ext.dependencies.rxpermissions) {
  55. exclude group: 'com.android.support'
  56. }
  57. // implementation 'com.github.tbruyelle:rxpermissions:0.12'
  58. //network
  59. api rootProject.ext.dependencies.okhttp
  60. api rootProject.ext.dependencies.retrofit
  61. api rootProject.ext.dependencies["converter-gson"]
  62. api rootProject.ext.dependencies["adapter-rxjava"]
  63. //json解析
  64. api rootProject.ext.dependencies.gson
  65. //material-dialogs
  66. api(rootProject.ext.dependencies["material-dialogs-core"]) {
  67. exclude group: 'com.android.support'
  68. }
  69. api(rootProject.ext.dependencies["material-dialogs-commons"]) {
  70. exclude group: 'com.android.support'
  71. }
  72. //glide图片加载库
  73. api (rootProject.ext.dependencies.glide){
  74. exclude group: 'com.android.support'
  75. }
  76. implementation 'androidx.recyclerview:recyclerview:1.1.0'
  77. annotationProcessor rootProject.ext.dependencies["glide-compiler"]
  78. //recyclerview的databinding套装
  79. api(rootProject.ext.dependencies.bindingcollectionadapter) {
  80. exclude group: 'com.android.support'
  81. }
  82. api(rootProject.ext.dependencies["bindingcollectionadapter-recyclerview"]) {
  83. exclude group: 'com.android.support'
  84. }
  85. //Google LiveData和ViewModel组件
  86. api rootProject.ext.dependencies["lifecycle-extensions"]
  87. annotationProcessor rootProject.ext.dependencies["lifecycle-compiler"]
  88. api rootProject.ext.dependencies["fastjson"]
  89. // implementation 'com.google.android.gms:play-services-ads:19.4.0'
  90. implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
  91. }