build.gradle 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. debug{
  36. minifyEnabled false
  37. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  38. }
  39. preRelease{
  40. minifyEnabled true
  41. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  42. }
  43. }
  44. sourceSets {
  45. main {
  46. //控制两种模式下的资源和代码配置情况
  47. manifest.srcFile 'src/main/AndroidManifest.xml'
  48. //集成开发模式下排除debug文件夹中的所有Java文件
  49. java {
  50. exclude 'debug/**'
  51. }
  52. jniLibs.srcDirs = ['libs']
  53. }
  54. }
  55. buildFeatures {
  56. viewBinding = true
  57. }
  58. }
  59. dependencies {
  60. api fileTree(dir: 'libs', include: ['*.jar'])
  61. implementation 'androidx.appcompat:appcompat:1.1.0'
  62. implementation 'com.google.android.material:material:1.4.0'
  63. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  64. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  65. testImplementation 'junit:junit:4.12'
  66. androidTestImplementation 'androidx.test:runner:1.2.0'
  67. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  68. implementation 'androidx.lifecycle:lifecycle-livedata:2.1.0-alpha04'
  69. implementation 'androidx.lifecycle:lifecycle-viewmodel:2.1.0-alpha04'
  70. implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  71. implementation 'com.github.netless-io:whiteboard-android:2.15.18'
  72. api project(path: ':rong_im:kit')
  73. api project(path: ':rong_im:live')
  74. api project(path: ':rong_im:sight')
  75. implementation project(path: ':usercenter')
  76. implementation project(path: ':BaseLibrary')
  77. implementation 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:1.0.0'
  78. //ARouter
  79. annotationProcessor("com.alibaba:arouter-compiler:$rootProject.ext.android.arouter_api_version")
  80. }