build.gradle.kts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. plugins {
  2. kotlin("multiplatform")
  3. id("com.android.library")
  4. id("dev.icerock.mobile.multiplatform-resources")
  5. }
  6. kotlin {
  7. androidTarget()
  8. sourceSets {
  9. val commonMain by getting {
  10. dependencies {
  11. api(libs.moko.core)
  12. }
  13. }
  14. val androidMain by getting {
  15. dependsOn(commonMain) // https://github.com/icerockdev/moko-resources/issues/562
  16. }
  17. }
  18. }
  19. android {
  20. namespace = "tachiyomi.i18n"
  21. sourceSets {
  22. named("main") {
  23. res.srcDir("src/commonMain/resources")
  24. }
  25. }
  26. lint {
  27. disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
  28. }
  29. }
  30. multiplatformResources {
  31. multiplatformResourcesPackage = "tachiyomi.i18n"
  32. }
  33. tasks {
  34. val localesConfigTask = registerLocalesConfigTask(project)
  35. preBuild {
  36. dependsOn(localesConfigTask)
  37. }
  38. withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
  39. kotlinOptions.freeCompilerArgs += listOf(
  40. "-Xexpect-actual-classes",
  41. )
  42. }
  43. }