build.gradle 4.1 KB

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