build.gradle.kts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. plugins {
  2. id("com.android.library")
  3. kotlin("android")
  4. }
  5. android {
  6. namespace = "tachiyomi.presentation.core"
  7. defaultConfig {
  8. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  9. consumerProguardFiles("consumer-rules.pro")
  10. }
  11. buildFeatures {
  12. compose = true
  13. }
  14. composeOptions {
  15. kotlinCompilerExtensionVersion = compose.versions.compiler.get()
  16. }
  17. }
  18. dependencies {
  19. api(project(":core"))
  20. api(project(":i18n"))
  21. // Compose
  22. implementation(platform(compose.bom))
  23. implementation(compose.activity)
  24. implementation(compose.foundation)
  25. implementation(compose.material3.core)
  26. implementation(compose.material.core)
  27. implementation(compose.material.icons)
  28. implementation(compose.animation)
  29. implementation(compose.animation.graphics)
  30. debugImplementation(compose.ui.tooling)
  31. implementation(compose.ui.tooling.preview)
  32. implementation(compose.ui.util)
  33. lintChecks(compose.lintchecks)
  34. implementation(kotlinx.immutables)
  35. }
  36. tasks {
  37. // See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
  38. withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
  39. kotlinOptions.freeCompilerArgs += listOf(
  40. "-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
  41. "-opt-in=androidx.compose.material.ExperimentalMaterialApi",
  42. "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
  43. "-opt-in=androidx.compose.material.ExperimentalMaterialApi",
  44. "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
  45. "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
  46. "-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
  47. "-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi",
  48. "-opt-in=coil.annotation.ExperimentalCoilApi",
  49. "-opt-in=kotlinx.coroutines.FlowPreview",
  50. )
  51. }
  52. }