build.gradle 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. apply plugin: "com.android.application"
  2. apply plugin: "kotlin-android"
  3. apply plugin: "kotlin-android-extensions"
  4. apply plugin: "kotlin-kapt"
  5. android {
  6. compileSdkVersion 29
  7. buildToolsVersion "29.0.2"
  8. defaultConfig {
  9. applicationId "com.drake.net.sample"
  10. minSdkVersion 19
  11. targetSdkVersion 29
  12. versionCode 1
  13. multiDexEnabled true
  14. versionName "1.0"
  15. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled false
  20. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  21. }
  22. }
  23. buildFeatures.dataBinding = true
  24. compileOptions {
  25. sourceCompatibility JavaVersion.VERSION_1_8
  26. targetCompatibility JavaVersion.VERSION_1_8
  27. }
  28. }
  29. dependencies {
  30. implementation fileTree(dir: "libs", include: ["*.jar"])
  31. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  32. implementation "androidx.appcompat:appcompat:1.1.0"
  33. implementation "androidx.core:core-ktx:1.3.0"
  34. implementation "androidx.constraintlayout:constraintlayout:1.1.3"
  35. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  36. testImplementation "junit:junit:4.13"
  37. androidTestImplementation "androidx.test:runner:1.2.0"
  38. androidTestImplementation "androidx.test.espresso:espresso-core:3.2.0"
  39. implementation "androidx.recyclerview:recyclerview:1.1.0"
  40. implementation "com.google.android.material:material:1.1.0"
  41. implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
  42. implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
  43. implementation project(path: ":net")
  44. // ------------------------------配合Net使用的库-------------------------------------
  45. implementation "com.github.liangjingkanji:BRV:$brv_version" // 提供自动分页/缺省页/自动下拉刷新功能
  46. implementation "com.github.bumptech.glide:glide:$glide_version" // 提供下载图片功能
  47. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" // 协程基础库
  48. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"
  49. // ------------------------------JSON解析-------------------------------------
  50. implementation "com.squareup.moshi:moshi-kotlin:1.8.0"
  51. kapt "com.squareup.moshi:moshi-kotlin-codegen:1.8.0"
  52. implementation 'com.google.code.gson:gson:2.8.6'
  53. // ------------------------------我的其他库-------------------------------------
  54. implementation 'com.github.liangjingkanji:StatusBar:1.0.3' // 透明状态栏
  55. implementation "com.github.liangjingkanji:LogCat:1.0" // 日志输出工具
  56. implementation 'com.github.liangjingkanji:debugkit:1.2.9'
  57. implementation 'com.github.liangjingkanji:Tooltip:1.0.4'
  58. // ------------------------------Google数据库-------------------------------------
  59. implementation "androidx.room:room-runtime:$room_version"
  60. kapt "androidx.room:room-compiler:$room_version"
  61. implementation "androidx.room:room-ktx:$room_version"
  62. }