build.gradle.kts 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import com.codeskraps.weather.ConfigData
  2. @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
  3. plugins {
  4. alias(libs.plugins.android.library)
  5. alias(libs.plugins.org.jetbrains.kotlin.android)
  6. alias(libs.plugins.com.google.devtools.ksp)
  7. alias(libs.plugins.dagger.hilt)
  8. }
  9. android {
  10. namespace = "com.codeskraps.feature.weather"
  11. compileSdk = ConfigData.compileSdk
  12. defaultConfig {
  13. minSdk = ConfigData.minSdk
  14. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  15. vectorDrawables {
  16. useSupportLibrary = true
  17. }
  18. }
  19. buildTypes {
  20. release {
  21. isMinifyEnabled = ConfigData.isMinifyRelease
  22. proguardFiles(
  23. getDefaultProguardFile("proguard-android-optimize.txt"),
  24. "proguard-rules.pro"
  25. )
  26. }
  27. debug {
  28. isMinifyEnabled = ConfigData.isMinifyDebug
  29. }
  30. }
  31. compileOptions {
  32. sourceCompatibility = ConfigData.javaVersion
  33. targetCompatibility = ConfigData.javaVersion
  34. }
  35. kotlinOptions {
  36. jvmTarget = ConfigData.javaTarget
  37. }
  38. buildFeatures {
  39. compose = true
  40. }
  41. composeOptions {
  42. kotlinCompilerExtensionVersion = ConfigData.kotlinCompiler
  43. }
  44. packaging {
  45. resources {
  46. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  47. }
  48. }
  49. hilt {
  50. enableAggregatingTask = true
  51. }
  52. }
  53. dependencies {
  54. implementation(project(mapOf("path" to ":feature:common")))
  55. implementation(project(mapOf("path" to ":core:location")))
  56. implementation(project(mapOf("path" to ":core:local")))
  57. implementation(libs.androidx.core.ktx)
  58. implementation(libs.androidx.lifecycle.runtime.ktx)
  59. implementation(libs.androidx.activity.compose)
  60. implementation(libs.androidx.navigation.compose)
  61. implementation(libs.androidx.lifecycle.runtime.compose)
  62. implementation(libs.android.compose.material)
  63. implementation(libs.android.compose.material3)
  64. implementation(libs.androidx.animation.graphics.android)
  65. val composeBom = platform(libs.androidx.compose.bom)
  66. implementation(composeBom)
  67. implementation(libs.androidx.compose.ui)
  68. implementation(libs.androidx.compose.graphics)
  69. implementation(libs.androidx.compose.tooling.preview)
  70. implementation(libs.kotlinx.collections.immutable)
  71. //Dagger - Hilt
  72. implementation(libs.hilt.android)
  73. ksp(libs.hilt.android.compiler)
  74. // Retrofit
  75. implementation(libs.retrofit.retrofit)
  76. implementation(libs.retrofit.converter.moshi)
  77. implementation(libs.coroutines.test)
  78. testImplementation(libs.junit.junit)
  79. androidTestImplementation(libs.androidx.junit)
  80. androidTestImplementation(libs.espresso.core)
  81. androidTestImplementation(composeBom)
  82. androidTestImplementation(libs.androidx.compose.test.junit4)
  83. debugImplementation(libs.androidx.compose.tooling)
  84. debugImplementation(libs.androidx.compose.test.manifest)
  85. }