build.gradle 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'com.jakewharton.butterknife'
  3. apply plugin: 'kotlin-android'
  4. apply plugin: 'kotlin-android-extensions'
  5. apply plugin: 'kotlin-kapt'
  6. android {
  7. compileSdkVersion build_versions.target_sdk
  8. defaultConfig {
  9. minSdkVersion build_versions.min_sdk
  10. targetSdkVersion build_versions.target_sdk
  11. versionCode 1
  12. versionName "1.0"
  13. javaCompileOptions {
  14. annotationProcessorOptions {
  15. arguments = [AROUTER_MODULE_NAME: project.getName()]
  16. }
  17. }
  18. }
  19. compileOptions {
  20. sourceCompatibility JavaVersion.VERSION_1_8
  21. targetCompatibility JavaVersion.VERSION_1_8
  22. }
  23. sourceSets {
  24. main {
  25. if (isModule.toBoolean()) {
  26. manifest.srcFile 'src/main/module/AndroidManifest.xml'
  27. } else {
  28. manifest.srcFile 'src/main/AndroidManifest.xml'
  29. //集成开发模式下排除debug文件夹中的所有Java文件
  30. java {
  31. exclude 'debug/**'
  32. }
  33. }
  34. }
  35. }
  36. buildTypes {
  37. release {
  38. minifyEnabled false
  39. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. buildFeatures {
  43. viewBinding = true
  44. }
  45. }
  46. dependencies {
  47. implementation fileTree(include: ['*.jar'], dir: 'libs')
  48. implementation project(':uchat_common')
  49. implementation deps.constraint_layout
  50. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  51. implementation 'androidx.appcompat:appcompat:1.2.0'
  52. annotationProcessor deps.arouter_compiler
  53. kapt deps.arouter_compiler
  54. annotationProcessor deps.butterknife_annotationProcessor
  55. kapt deps.butterknife_annotationProcessor
  56. }