build.gradle.kts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.common"
  11. compileSdk = ConfigData.compileSdk
  12. defaultConfig {
  13. minSdk = ConfigData.minSdk
  14. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  15. }
  16. buildTypes {
  17. release {
  18. isMinifyEnabled = ConfigData.isMinifyRelease
  19. proguardFiles(
  20. getDefaultProguardFile("proguard-android-optimize.txt"),
  21. "proguard-rules.pro"
  22. )
  23. }
  24. debug {
  25. isMinifyEnabled = ConfigData.isMinifyDebug
  26. }
  27. }
  28. compileOptions {
  29. sourceCompatibility = ConfigData.javaVersion
  30. targetCompatibility = ConfigData.javaVersion
  31. }
  32. kotlinOptions {
  33. jvmTarget = ConfigData.javaTarget
  34. }
  35. buildFeatures {
  36. compose = true
  37. }
  38. composeOptions {
  39. kotlinCompilerExtensionVersion = ConfigData.kotlinCompiler
  40. }
  41. packaging {
  42. resources {
  43. excludes += "/META-INF/{AL2.0,LGPL2.1}"
  44. }
  45. }
  46. hilt {
  47. enableAggregatingTask = true
  48. }
  49. }
  50. dependencies {
  51. implementation(libs.androidx.core.ktx)
  52. implementation(libs.appcompat)
  53. implementation(libs.material)
  54. implementation(libs.androidx.activity.compose)
  55. //Dagger - Hilt
  56. implementation(libs.hilt.android)
  57. ksp(libs.hilt.android.compiler)
  58. testImplementation(libs.junit.junit)
  59. androidTestImplementation(libs.androidx.junit)
  60. androidTestImplementation(libs.espresso.core)
  61. implementation(libs.coroutines.test)
  62. }