build.gradle 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (C) 2018 Drake, Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. apply plugin: "com.android.application"
  17. apply plugin: "kotlin-android"
  18. apply plugin: "kotlin-android-extensions"
  19. apply plugin: "kotlin-kapt"
  20. android {
  21. compileSdkVersion 30
  22. defaultConfig {
  23. applicationId "com.drake.net.sample"
  24. minSdkVersion 19
  25. targetSdkVersion 30
  26. versionCode 1
  27. multiDexEnabled true
  28. versionName "1.0"
  29. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  30. }
  31. buildTypes {
  32. release {
  33. minifyEnabled false
  34. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  35. }
  36. }
  37. dataBinding {
  38. enabled = true
  39. }
  40. kotlinOptions {
  41. jvmTarget = JavaVersion.VERSION_1_8
  42. }
  43. compileOptions {
  44. sourceCompatibility JavaVersion.VERSION_1_8
  45. targetCompatibility JavaVersion.VERSION_1_8
  46. }
  47. }
  48. dependencies {
  49. implementation fileTree(dir: "libs", include: ["*.jar"])
  50. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  51. implementation "androidx.appcompat:appcompat:1.2.0"
  52. implementation "androidx.core:core-ktx:1.3.2"
  53. implementation "androidx.constraintlayout:constraintlayout:2.0.4"
  54. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  55. testImplementation "junit:junit:4.13.2"
  56. androidTestImplementation "androidx.test:runner:1.3.0"
  57. androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
  58. implementation "androidx.recyclerview:recyclerview:1.1.0"
  59. implementation "com.google.android.material:material:1.3.0"
  60. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
  61. implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
  62. implementation project(path: ":net")
  63. // ------------------------------配合Net使用的库-------------------------------------
  64. implementation "com.github.liangjingkanji:BRV:$brv_version" // 提供自动分页/缺省页/自动下拉刷新功能
  65. implementation "com.github.bumptech.glide:glide:$glide_version" // 提供下载图片功能
  66. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" // 协程基础库
  67. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"
  68. // ------------------------------JSON解析-------------------------------------
  69. implementation "com.squareup.moshi:moshi-kotlin:1.8.0"
  70. kapt "com.squareup.moshi:moshi-kotlin-codegen:1.8.0"
  71. implementation 'com.google.code.gson:gson:2.8.6'
  72. implementation 'com.alibaba:fastjson:1.2.48'
  73. // ------------------------------我的其他库-------------------------------------
  74. implementation 'com.github.liangjingkanji:StatusBar:1.1.0' // 透明状态栏
  75. implementation 'com.github.liangjingkanji:debugkit:1.2.10' // 开发调试窗口工具
  76. implementation 'com.github.liangjingkanji:Tooltip:1.1.0' // 吐司工具
  77. // ------------------------------Google数据库-------------------------------------
  78. implementation "androidx.room:room-runtime:$room_version"
  79. kapt "androidx.room:room-compiler:$room_version"
  80. implementation "androidx.room:room-ktx:$room_version"
  81. }