build.gradle 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion rootProject.ext.android.compileSdkVersion
  4. defaultConfig {
  5. minSdkVersion rootProject.ext.android.minSdkVersion
  6. targetSdkVersion rootProject.ext.android.targetSdkVersion
  7. versionCode rootProject.ext.android.versionCode
  8. versionName rootProject.ext.android.versionName
  9. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  10. ndk {
  11. abiFilters "armeabi-v7a", "arm64-v8a"
  12. }
  13. javaCompileOptions {
  14. annotationProcessorOptions {
  15. arguments = [AROUTER_MODULE_NAME: project.getName()]
  16. }
  17. }
  18. multiDexEnabled true
  19. flavorDimensions "app"//多渠道打包维度不同问题
  20. }
  21. sourceSets {
  22. main {
  23. jniLibs.srcDirs = ['libs']
  24. }
  25. }
  26. compileOptions {
  27. sourceCompatibility JavaVersion.VERSION_1_8
  28. targetCompatibility JavaVersion.VERSION_1_8
  29. }
  30. buildTypes {
  31. release {
  32. minifyEnabled true
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. }
  35. }
  36. sourceSets {
  37. main {
  38. //控制两种模式下的资源和代码配置情况
  39. manifest.srcFile 'src/main/AndroidManifest.xml'
  40. //集成开发模式下排除debug文件夹中的所有Java文件
  41. java {
  42. exclude 'debug/**'
  43. }
  44. jniLibs.srcDirs = ['libs']
  45. }
  46. }
  47. buildFeatures {
  48. viewBinding = true
  49. }
  50. }
  51. dependencies {
  52. api fileTree(dir: 'libs', include: ['*.jar'])
  53. implementation 'androidx.appcompat:appcompat:1.1.0'
  54. implementation 'com.google.android.material:material:1.4.0'
  55. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  56. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  57. testImplementation 'junit:junit:4.12'
  58. androidTestImplementation 'androidx.test:runner:1.2.0'
  59. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  60. implementation 'androidx.lifecycle:lifecycle-livedata:2.1.0-alpha04'
  61. implementation 'androidx.lifecycle:lifecycle-viewmodel:2.1.0-alpha04'
  62. implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  63. implementation 'com.github.netless-io:whiteboard-android:2.15.18'
  64. api project(path: ':rong_im:kit')
  65. api project(path: ':rong_im:live')
  66. api project(path: ':rong_im:sight')
  67. implementation project(path: ':usercenter')
  68. implementation project(path: ':BaseLibrary')
  69. implementation 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:1.0.0'
  70. //ARouter
  71. annotationProcessor("com.alibaba:arouter-compiler:$rootProject.ext.android.arouter_api_version")
  72. }