build.gradle.kts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. implementation(project(":core"))
  20. // Compose
  21. implementation(platform(compose.bom))
  22. implementation(compose.activity)
  23. implementation(compose.foundation)
  24. implementation(compose.material3.core)
  25. implementation(compose.material.core)
  26. implementation(compose.material.icons)
  27. implementation(compose.animation)
  28. implementation(compose.animation.graphics)
  29. debugImplementation(compose.ui.tooling)
  30. implementation(compose.ui.tooling.preview)
  31. implementation(compose.ui.util)
  32. }
  33. tasks {
  34. // See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
  35. withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
  36. kotlinOptions.freeCompilerArgs += listOf(
  37. "-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
  38. "-opt-in=androidx.compose.material.ExperimentalMaterialApi",
  39. "-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
  40. "-opt-in=androidx.compose.material.ExperimentalMaterialApi",
  41. "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
  42. "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
  43. "-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
  44. "-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi",
  45. "-opt-in=coil.annotation.ExperimentalCoilApi",
  46. "-opt-in=kotlinx.coroutines.FlowPreview",
  47. )
  48. }
  49. }