build.gradle 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. apply plugin: 'com.android.library'
  2. //apply plugin: 'android-aspectjx'
  3. android {
  4. compileSdkVersion rootProject.ext.android["compileSdkVersion"]
  5. buildToolsVersion rootProject.ext.android["buildToolsVersion"]
  6. defaultConfig {
  7. minSdkVersion rootProject.ext.android["minSdkVersion"]
  8. targetSdkVersion rootProject.ext.android["targetSdkVersion"]
  9. versionCode rootProject.ext.android["versionCode"]
  10. versionName rootProject.ext.android["versionName"]
  11. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  12. consumerProguardFiles 'consumer-rules.pro'
  13. // ARouter路由
  14. javaCompileOptions {
  15. annotationProcessorOptions {
  16. arguments = [AROUTER_MODULE_NAME: project.getName()]
  17. }
  18. }
  19. }
  20. buildTypes {
  21. debug {
  22. //自定义Gradle常量
  23. buildConfigField("boolean", "LOG_DEBUG", "true")
  24. buildConfigField("String", "LOG_TAG", "\"HHOMC\"")
  25. buildConfigField("String", "SP_NAME", "\"Sp_Config\"")
  26. }
  27. yufabu {
  28. //自定义Gradle常量
  29. buildConfigField("boolean", "LOG_DEBUG", "true")
  30. buildConfigField("String", "LOG_TAG", "\"HHOMC\"")
  31. buildConfigField("String", "SP_NAME", "\"Sp_Config\"")
  32. }
  33. release {
  34. buildConfigField("boolean", "LOG_DEBUG", "true")
  35. buildConfigField("String", "LOG_TAG", "\"HHOMC\"")
  36. buildConfigField("String", "SP_NAME", "\"Sp_Config\"")
  37. minifyEnabled false
  38. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  39. }
  40. }
  41. // 支持 JDK 1.8
  42. compileOptions {
  43. targetCompatibility JavaVersion.VERSION_1_8
  44. sourceCompatibility JavaVersion.VERSION_1_8
  45. }
  46. }
  47. dependencies {
  48. implementation fileTree(dir: 'libs', include: ['*.jar'])
  49. testImplementation 'junit:junit:4.12'
  50. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  51. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  52. annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
  53. api rootProject.ext.dependencies["arouter-api"]
  54. api rootProject.ext.dependencies["appcompat"]
  55. api rootProject.ext.dependencies["rxjava2"]
  56. api rootProject.ext.dependencies["rxandroid2"]
  57. api rootProject.ext.dependencies["retrofit-adapter-rxjava"]
  58. api rootProject.ext.dependencies["okio"]
  59. api rootProject.ext.dependencies["gson"]
  60. api rootProject.ext.dependencies["okhttp3"]
  61. api rootProject.ext.dependencies["okhttp3-log"]
  62. api rootProject.ext.dependencies["retrofit"]
  63. api rootProject.ext.dependencies["retrofit-rxjava"]
  64. api rootProject.ext.dependencies["retrofit-gson"]
  65. api rootProject.ext.dependencies["circleimageview"]
  66. api rootProject.ext.dependencies["glide"]
  67. api rootProject.ext.dependencies["recyclerview"]
  68. api rootProject.ext.dependencies["eventbus"]
  69. api rootProject.ext.dependencies["immersionbar"]
  70. api rootProject.ext.dependencies["aspectj"]
  71. api rootProject.ext.dependencies["brvah"]
  72. api rootProject.ext.dependencies["PageStateManager"]
  73. api rootProject.ext.dependencies["permissions"]
  74. api rootProject.ext.dependencies["autosize"]
  75. api rootProject.ext.dependencies["lifecycle-extensions"]
  76. api rootProject.ext.dependencies["lifecycle-runtime"]
  77. api rootProject.ext.dependencies["StatusLayoutManager"]
  78. api rootProject.ext.dependencies["SwipeDelMenuLayout"]
  79. api rootProject.ext.dependencies["flexbox"]
  80. api rootProject.ext.dependencies["flowlayout"]
  81. api rootProject.ext.dependencies["oss-android-sdk"]
  82. api rootProject.ext.dependencies["PictureSelector"]
  83. api rootProject.ext.dependencies["PickerView"]
  84. api rootProject.ext.dependencies["ShadowLayout"]
  85. api rootProject.ext.dependencies["SwitchButton"]
  86. api rootProject.ext.dependencies["event-bus"]
  87. api rootProject.ext.dependencies["blankj-utilcodex"]
  88. implementation 'org.ahocorasick:ahocorasick:0.3.0'
  89. }
  90. repositories {
  91. mavenCentral()
  92. }