build.gradle.kts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. plugins {
  2. id("com.android.application")
  3. id("org.jetbrains.kotlin.android")
  4. kotlin("kapt") version Sdk.kotlin
  5. }
  6. android {
  7. compileSdk = Sdk.compileSdk
  8. defaultConfig {
  9. applicationId = "com.ys.bdtp.adm"
  10. minSdk = Sdk.minSdk
  11. targetSdk = Sdk.targetSdk
  12. versionCode = Sdk.versionCode
  13. versionName = Sdk.versionName
  14. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  15. vectorDrawables {
  16. useSupportLibrary = true
  17. }
  18. }
  19. buildTypes {
  20. release {
  21. isMinifyEnabled = false
  22. proguardFiles(
  23. getDefaultProguardFile("proguard-android-optimize.txt"),
  24. "proguard-rules.pro"
  25. )
  26. }
  27. }
  28. compileOptions {
  29. sourceCompatibility = JavaVersion.VERSION_1_8
  30. targetCompatibility = JavaVersion.VERSION_1_8
  31. }
  32. kotlinOptions {
  33. jvmTarget = "1.8"
  34. // 将数据库
  35. kapt {
  36. arguments {
  37. arg("room.schemaLocation", "$rootDir/schemas")
  38. }
  39. }
  40. }
  41. buildFeatures {
  42. compose = true
  43. }
  44. composeOptions {
  45. kotlinCompilerExtensionVersion = Sdk.compose
  46. }
  47. packagingOptions {
  48. resources {
  49. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  50. }
  51. }
  52. }
  53. dependencies {
  54. // androidx
  55. implementation(Deps.Androidx.Core)
  56. implementation(Deps.Androidx.Appcompat)
  57. // google
  58. implementation(Deps.Google.Material)
  59. implementation(Deps.Google.Accompanist.Coil)
  60. implementation(Deps.Google.Accompanist.Insets)
  61. implementation(Deps.Google.Gson)
  62. // lifecycle
  63. implementation(Deps.Lifecycle.Runtime)
  64. implementation(Deps.Lifecycle.Livedata)
  65. implementation(Deps.Lifecycle.ViewModel)
  66. implementation(Deps.Lifecycle.Compose)
  67. // room
  68. kapt(Deps.Room.Compiler)
  69. implementation(Deps.Room.Ktx)
  70. implementation(Deps.Room.Runtime)
  71. // navigation
  72. implementation(Deps.Navigation.Runtime)
  73. implementation(Deps.Navigation.Compose)
  74. // kodein
  75. implementation(Deps.Kodein.Di)
  76. implementation(Deps.Kodein.Compose)
  77. implementation(Deps.Kodein.Androidx)
  78. implementation(Deps.Kodein.ViewModel)
  79. // kotlinx
  80. implementation(Deps.Kotlinx.Json)
  81. // square
  82. implementation(Deps.Square.Retrofit)
  83. implementation(Deps.Square.Converter.Gson)
  84. implementation(Deps.Square.Interceptor.Logging)
  85. // Compose
  86. implementation(Deps.Compose.Animation)
  87. implementation(Deps.Compose.Compiler)
  88. implementation(Deps.Compose.Foundation)
  89. implementation(Deps.Compose.Material.Material)
  90. implementation(Deps.Compose.Material.Extended)
  91. implementation(Deps.Compose.Runtime.Runtime)
  92. implementation(Deps.Compose.Runtime.LiveData)
  93. implementation(Deps.Compose.UI.UI)
  94. implementation(Deps.Compose.UI.Preview)
  95. implementation(Deps.Compose.UI.Tooling)
  96. implementation(Deps.Compose.Paging)
  97. implementation(Deps.Compose.ConstraintLayout)
  98. // .Compose
  99. implementation(Deps.Androidx.Compose)
  100. implementation(Deps.Lifecycle.Compose)
  101. implementation(Deps.Navigation.Compose)
  102. // test
  103. testImplementation(Deps.Test.Junit)
  104. testImplementation(Deps.Room.Test)
  105. androidTestImplementation(Deps.AndroidXTest.Espresso)
  106. androidTestImplementation(Deps.Compose.Test.Compose)
  107. androidTestImplementation(Deps.AndroidXTest.Ktx)
  108. androidTestImplementation(Deps.AndroidXTest.Ext)
  109. debugImplementation(Deps.Compose.Debug.Tooling)
  110. }