build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. if (componentTag){
  2. apply plugin: 'com.android.application'
  3. apply plugin: 'com.enation.javashop.aspectjrt'
  4. }else{
  5. apply plugin: 'com.android.library'
  6. }
  7. apply plugin: 'kotlin-android'
  8. apply plugin: 'kotlin-android-extensions'
  9. apply plugin: 'kotlin-kapt'
  10. kapt {
  11. arguments {
  12. arg("moduleName", project.getName())
  13. }
  14. }
  15. android {
  16. compileSdkVersion target_sdk_version
  17. buildToolsVersion build_tools_version
  18. defaultConfig {
  19. if (componentTag){
  20. applicationId "com.wdkl.ncs.android.component.welcome"
  21. multiDexEnabled true
  22. }
  23. minSdkVersion min_sdk_version
  24. targetSdkVersion target_sdk_version
  25. versionCode app_version_code
  26. versionName app_version
  27. dataBinding {
  28. enabled = true
  29. }
  30. }
  31. lintOptions {
  32. abortOnError false
  33. }
  34. buildTypes {
  35. release {
  36. minifyEnabled false
  37. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  38. }
  39. }
  40. sourceSets {
  41. main.java.srcDirs += 'src/main/code'
  42. if(componentTag){
  43. main.manifest.srcFile 'src/main/ApkBuildDir/AndroidManifest.xml'
  44. }else{
  45. main.manifest.srcFile 'src/main/AndroidManifest.xml'
  46. main.java {
  47. exclude 'apkbuild/**'
  48. }
  49. }
  50. }
  51. compileOptions {
  52. sourceCompatibility JavaVersion.VERSION_1_8
  53. targetCompatibility JavaVersion.VERSION_1_8
  54. }
  55. }
  56. dependencies {
  57. compile fileTree(include: ['*.jar'], dir: 'libs')
  58. /**
  59. * constraint-layout布局依赖
  60. */
  61. implementation("androidx.constraintlayout:constraintlayout:2.1.4")
  62. /**
  63. * 单元测试
  64. */
  65. testCompile 'junit:junit:4.12'
  66. /**
  67. * 公共库依赖
  68. */
  69. compile project(':middleware')
  70. /**
  71. * Dagger编译依赖
  72. */
  73. kapt 'com.google.dagger:dagger-compiler:2.7'
  74. /**
  75. * 路由注解处理器
  76. */
  77. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  78. }
  79. /**
  80. * kawo组件化框架配置
  81. */
  82. if(componentTag){
  83. kawo {
  84. /**
  85. * Aop注解排除Jar
  86. */
  87. aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
  88. }
  89. }