build.gradle.kts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.application)
  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.weather"
  11. compileSdk = ConfigData.compileSdk
  12. defaultConfig {
  13. applicationId = "com.arklan.weather"
  14. minSdk = ConfigData.minSdk
  15. targetSdk = ConfigData.targetSdk
  16. versionCode = 13
  17. versionName = "2.3"
  18. setProperty("archivesBaseName", "weekly-weather-v$versionName.$versionCode")
  19. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  20. vectorDrawables {
  21. useSupportLibrary = true
  22. }
  23. }
  24. buildTypes {
  25. release {
  26. isMinifyEnabled = ConfigData.isMinifyRelease
  27. proguardFiles(
  28. getDefaultProguardFile("proguard-android-optimize.txt"),
  29. "proguard-rules.pro"
  30. )
  31. }
  32. debug {
  33. isMinifyEnabled = ConfigData.isMinifyDebug
  34. applicationIdSuffix = ".debug"
  35. versionNameSuffix = "-DEBUG"
  36. }
  37. }
  38. compileOptions {
  39. sourceCompatibility = ConfigData.javaVersion
  40. targetCompatibility = ConfigData.javaVersion
  41. }
  42. kotlinOptions {
  43. jvmTarget = ConfigData.javaTarget
  44. }
  45. buildFeatures {
  46. compose = true
  47. }
  48. composeOptions {
  49. kotlinCompilerExtensionVersion = ConfigData.kotlinCompiler
  50. }
  51. packaging {
  52. resources {
  53. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  54. }
  55. }
  56. hilt {
  57. enableAggregatingTask = true
  58. }
  59. }
  60. dependencies {
  61. implementation(project(mapOf("path" to ":feature:common")))
  62. implementation(project(mapOf("path" to ":feature:geocoding")))
  63. implementation(project(mapOf("path" to ":feature:weather")))
  64. implementation(project(mapOf("path" to ":feature:maps")))
  65. implementation(libs.androidx.core.ktx)
  66. implementation(libs.androidx.lifecycle.runtime.ktx)
  67. implementation(libs.androidx.activity.compose)
  68. implementation(libs.androidx.navigation.compose)
  69. implementation(libs.androidx.lifecycle.runtime.compose)
  70. implementation(libs.android.compose.material3)
  71. val composeBom = platform(libs.androidx.compose.bom)
  72. implementation(composeBom)
  73. implementation(libs.androidx.compose.ui)
  74. implementation(libs.androidx.compose.graphics)
  75. implementation(libs.androidx.compose.tooling.preview)
  76. //Dagger - Hilt
  77. implementation(libs.hilt.android)
  78. implementation(libs.hilt.navigation.compose)
  79. ksp(libs.hilt.android.compiler)
  80. implementation(libs.coroutines.test)
  81. testImplementation(libs.junit.junit)
  82. androidTestImplementation(composeBom)
  83. androidTestImplementation(libs.androidx.junit)
  84. androidTestImplementation(libs.espresso.core)
  85. androidTestImplementation(libs.androidx.compose.test.junit4)
  86. debugImplementation(libs.androidx.compose.tooling)
  87. debugImplementation(libs.androidx.compose.test.manifest)
  88. }