build.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. def versionCode = 1
  5. def versionName = "0.0.1.011"
  6. android {
  7. namespace 'cn.org.bjca.trust.android.lib.im'
  8. compileSdk 33
  9. defaultConfig {
  10. minSdk 26
  11. targetSdk 33
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. consumerProguardFiles "consumer-rules.pro"
  14. multiDexEnabled true
  15. buildConfigField("String", "versionName", "\"${versionName}\"")
  16. }
  17. buildTypes {
  18. release {
  19. // 开启混淆
  20. minifyEnabled true
  21. // Zipalign压缩优化
  22. zipAlignEnabled true
  23. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  24. }
  25. }
  26. compileOptions {
  27. sourceCompatibility JavaVersion.VERSION_1_8
  28. targetCompatibility JavaVersion.VERSION_1_8
  29. }
  30. }
  31. dependencies {
  32. implementation 'androidx.appcompat:appcompat:1.4.2'
  33. implementation 'com.google.android.material:material:1.5.0'
  34. testImplementation 'junit:junit:4.13.2'
  35. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  36. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  37. //数据库相关
  38. implementation("androidx.room:room-runtime:2.5.0")
  39. annotationProcessor ("androidx.room:room-compiler:2.5.0")
  40. // 网络相关
  41. //Rxjava
  42. implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
  43. //Retrofit
  44. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  45. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  46. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
  47. implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
  48. //添加mqtt 2个包
  49. implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
  50. implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
  51. //gson
  52. implementation 'com.google.code.gson:gson:2.9.0'
  53. }