build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 project(':uchat_common')
  49. annotationProcessor deps.arouter_compiler
  50. kapt deps.arouter_compiler
  51. annotationProcessor deps.butterknife_annotationProcessor
  52. kapt deps.butterknife_annotationProcessor
  53. }