build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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-optimize.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. buildFeatures {
  43. viewBinding = true
  44. }
  45. }
  46. dependencies {
  47. implementation fileTree(dir: 'libs', include: ['*.jar'])
  48. implementation deps.constraint_layout
  49. implementation 'com.android.support:design:28.0.0'
  50. implementation project(':uchat_common')
  51. implementation 'androidx.appcompat:appcompat:1.2.0'
  52. implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
  53. annotationProcessor deps.butterknife_annotationProcessor
  54. kapt deps.butterknife_annotationProcessor
  55. annotationProcessor deps.arouter_compiler
  56. kapt deps.arouter_compiler
  57. implementation 'com.kyleduo.switchbutton:library:2.0.0'
  58. }