build.gradle 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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:2.2.2', {
  47. exclude group: 'com.android.support', module: 'support-annotations'
  48. })
  49. compile project(':common')
  50. compile project(':resource')
  51. /**
  52. * Dagger编译依赖
  53. */
  54. kapt 'com.google.dagger:dagger-compiler:2.7'
  55. /**
  56. * Kotlin依赖
  57. */
  58. kapt 'com.android.databinding:compiler:2.3.3'
  59. /**
  60. * 路由注解处理器
  61. */
  62. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  63. /**
  64. * constraint-layout布局依赖
  65. */
  66. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  67. compile 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
  68. compile 'io.swagger:swagger-annotations:1.5.14'
  69. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  70. implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
  71. //compile 'com.github.tiann:FreeReflection:3.1.0'
  72. }