build.gradle 2.3 KB

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