build.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-kapt'
  4. apply plugin: 'dagger.hilt.android.plugin'
  5. android {
  6. compileSdkVersion versions.compileSdk
  7. buildToolsVersion versions.buildToolsVersion
  8. defaultConfig {
  9. minSdkVersion versions.minSdk
  10. targetSdkVersion versions.targetSdk
  11. versionCode 1
  12. versionName "1.0"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. consumerProguardFiles 'consumer-rules.pro'
  15. multiDexEnabled true
  16. vectorDrawables.useSupportLibrary = true
  17. }
  18. buildTypes {
  19. release {
  20. minifyEnabled false
  21. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  22. }
  23. }
  24. compileOptions {
  25. sourceCompatibility JavaVersion.VERSION_1_8
  26. targetCompatibility JavaVersion.VERSION_1_8
  27. }
  28. kotlinOptions {
  29. freeCompilerArgs = ['-Xjvm-default=enable']
  30. jvmTarget = JavaVersion.VERSION_1_8
  31. }
  32. lintOptions {
  33. checkReleaseBuilds false
  34. }
  35. dexOptions {
  36. preDexLibraries true
  37. maxProcessCount 8
  38. }
  39. buildFeatures {
  40. dataBinding = true
  41. viewBinding = true
  42. }
  43. }
  44. dependencies {
  45. api fileTree(dir: 'libs', include: ['*.jar'])
  46. //每个模块都要实现的依赖
  47. //Test
  48. testImplementation deps.android.junit
  49. androidTestImplementation deps.android.test_junit
  50. androidTestImplementation deps.android.test_espresso
  51. //依赖注入
  52. implementation deps.support.hilt
  53. kapt deps.support.hilt_kapt
  54. implementation deps.support.hilt_vm
  55. kapt deps.support.hilt_vm_kapt
  56. implementation project(':cs_cptServices')
  57. }