build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. // id 'kotlin-parcelize'
  5. id 'kotlin-android'
  6. // id 'kotlin-android-extensions'
  7. }
  8. apply plugin: 'kotlin-kapt'
  9. apply plugin: 'kotlin-android-extensions'
  10. android {
  11. compileSdk 31
  12. defaultConfig {
  13. minSdk 21
  14. targetSdk 31
  15. versionCode 1
  16. versionName "1.0"
  17. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  18. }
  19. buildTypes {
  20. release {
  21. minifyEnabled false
  22. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  23. }
  24. }
  25. compileOptions {
  26. sourceCompatibility JavaVersion.VERSION_1_8
  27. targetCompatibility JavaVersion.VERSION_1_8
  28. }
  29. kotlinOptions {
  30. jvmTarget = '1.8'
  31. }
  32. }
  33. kapt {
  34. arguments {
  35. arg("AROUTER_MODULE_NAME", project.getName())
  36. }
  37. }
  38. dependencies {
  39. testImplementation 'junit:junit:4.13.2'
  40. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  41. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  42. implementation 'androidx.core:core-ktx:1.7.0'
  43. implementation 'androidx.appcompat:appcompat:1.3.0'
  44. implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
  45. //kotlin
  46. api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1'
  47. api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  48. api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
  49. //recyclerview
  50. implementation("androidx.recyclerview:recyclerview:1.2.1")
  51. // For control over item selection of both touch and mouse driven selection
  52. implementation("androidx.recyclerview:recyclerview-selection:1.1.0")
  53. implementation 'com.alibaba:arouter-api:1.5.2'
  54. kapt 'com.alibaba:arouter-compiler:1.5.2'
  55. //RxLifecycle
  56. api 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle-kotlin:4.0.2'
  57. api 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2'
  58. //Glide
  59. // implementation "com.github.bumptech.glide:glide:$glide_version"
  60. implementation "com.github.bumptech.glide:glide:$glide_version"
  61. kapt "com.github.bumptech.glide:compiler:$glide_version"
  62. //Banner
  63. api 'io.github.youth5201314:banner:2.2.2'
  64. // BottomNavigation
  65. api 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
  66. // Add Dagger dependencies
  67. api "com.google.dagger:dagger:$dagger_version"
  68. kapt "com.google.dagger:dagger-compiler:$dagger_version"
  69. // implementation("io.reactivex.rxjava3:rxkotlin:3.x.y")
  70. // // RxKotlin and RxAndroid
  71. //// implementation "io.reactivex:rxkotlin:$rx_kotlin_version"
  72. // implementation 'com.github.ReactiveX:RxKotlin:3.x-SNAPSHOT'
  73. // compile "io.reactivex:rxkotlin:$rx_kotlin_version"
  74. implementation("io.reactivex.rxjava3:rxkotlin:3.0.0")
  75. // compile "io.reactivex:rxandroid:${rx_android_version}"
  76. implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
  77. // Because RxAndroid releases are few and far between, it is recommended you also
  78. // explicitly depend on RxJava's latest version for bug fixes and new features.
  79. // (see https://github.com/ReactiveX/RxJava/releases for latest 3.x.x version)
  80. implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
  81. //Retrofit
  82. api("com.squareup.okhttp3:okhttp:${ok_http_version}")
  83. api "com.squareup.okhttp3:logging-interceptor:${ok_http_version}"
  84. api "com.squareup.retrofit2:retrofit:${retrofit_version}"
  85. api "com.squareup.retrofit2:converter-gson:${retrofit_version}"
  86. api "com.squareup.retrofit2:adapter-rxjava:${retrofit_version}"
  87. //MulitStateView
  88. api "com.github.Kennyc1012:MultiStateView:$multi_state_view_version"
  89. //ARouter
  90. // implementation "com.alibaba:arouter-api:$arouter_api_version"
  91. api "com.alibaba:arouter-api:$arouter_api_version"
  92. kapt "com.alibaba:arouter-compiler:$arouter_api_version"
  93. }