build.gradle 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. kapt {
  6. arguments {
  7. arg("moduleName", project.getName())
  8. }
  9. }
  10. android {
  11. compileSdkVersion target_sdk_version
  12. buildToolsVersion build_tools_version
  13. defaultConfig {
  14. minSdkVersion min_sdk_version
  15. targetSdkVersion target_sdk_version
  16. versionCode app_version_code
  17. versionName app_version
  18. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  19. dataBinding {
  20. enabled = true
  21. }
  22. }
  23. lintOptions {
  24. abortOnError false
  25. }
  26. buildTypes {
  27. release {
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  30. }
  31. }
  32. sourceSets {
  33. main.java.srcDirs += 'src/main/code'
  34. }
  35. kapt {
  36. generateStubs = true
  37. }
  38. compileOptions {
  39. sourceCompatibility JavaVersion.VERSION_1_8
  40. targetCompatibility JavaVersion.VERSION_1_8
  41. }
  42. }
  43. dependencies {
  44. compile fileTree(include: ['*.jar'], dir: 'libs')
  45. testCompile 'junit:junit:4.12'
  46. androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
  47. exclude group: 'com.android.support', module: 'support-annotations'
  48. })
  49. compile project(':common')
  50. compile project(':resource')
  51. compile project(':traditionlib')
  52. /**
  53. * Dagger编译依赖
  54. */
  55. kapt 'com.google.dagger:dagger-compiler:2.7'
  56. /**
  57. * Kotlin依赖
  58. */
  59. kapt 'com.android.databinding:compiler:2.3.3'
  60. /**
  61. * 路由注解处理器
  62. */
  63. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  64. /**
  65. * constraint-layout布局依赖
  66. */
  67. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  68. compile 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
  69. compile 'io.swagger:swagger-annotations:1.5.14'
  70. }