build.gradle 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 29
  22. buildToolsVersion "29.0.2"
  23. defaultConfig {
  24. applicationId "com.drake.net.sample"
  25. minSdkVersion 19
  26. targetSdkVersion 29
  27. versionCode 1
  28. multiDexEnabled true
  29. versionName "1.0"
  30. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  31. }
  32. buildTypes {
  33. release {
  34. minifyEnabled false
  35. proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
  36. }
  37. }
  38. dataBinding {
  39. enabled = true
  40. }
  41. kotlinOptions {
  42. jvmTarget = JavaVersion.VERSION_1_8
  43. }
  44. compileOptions {
  45. sourceCompatibility JavaVersion.VERSION_1_8
  46. targetCompatibility JavaVersion.VERSION_1_8
  47. }
  48. }
  49. dependencies {
  50. implementation fileTree(dir: "libs", include: ["*.jar"])
  51. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  52. implementation "androidx.appcompat:appcompat:1.2.0"
  53. implementation "androidx.core:core-ktx:1.3.1"
  54. implementation "androidx.constraintlayout:constraintlayout:2.0.0"
  55. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  56. testImplementation "junit:junit:4.13"
  57. androidTestImplementation "androidx.test:runner:1.3.0"
  58. androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
  59. implementation "androidx.recyclerview:recyclerview:1.1.0"
  60. implementation "com.google.android.material:material:1.2.0"
  61. implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
  62. implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
  63. implementation project(path: ":net")
  64. // ------------------------------配合Net使用的库-------------------------------------
  65. implementation "com.github.liangjingkanji:BRV:$brv_version" // 提供自动分页/缺省页/自动下拉刷新功能
  66. implementation "com.github.bumptech.glide:glide:$glide_version" // 提供下载图片功能
  67. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" // 协程基础库
  68. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"
  69. // ------------------------------JSON解析-------------------------------------
  70. implementation "com.squareup.moshi:moshi-kotlin:1.8.0"
  71. kapt "com.squareup.moshi:moshi-kotlin-codegen:1.8.0"
  72. implementation 'com.google.code.gson:gson:2.8.6'
  73. // ------------------------------我的其他库-------------------------------------
  74. implementation 'com.github.liangjingkanji:StatusBar:1.0.3' // 透明状态栏
  75. implementation "com.github.liangjingkanji:LogCat:1.0" // 日志输出工具
  76. implementation 'com.github.liangjingkanji:debugkit:1.2.9' // 开发调试窗口工具
  77. implementation 'com.github.liangjingkanji:Tooltip:1.0.4' // 吐司工具
  78. // ------------------------------Google数据库-------------------------------------
  79. implementation "androidx.room:room-runtime:$room_version"
  80. kapt "androidx.room:room-compiler:$room_version"
  81. implementation "androidx.room:room-ktx:$room_version"
  82. }