2022-09-10 16:58:45 +03:00
|
|
|
plugins {
|
2023-11-18 21:54:56 +03:00
|
|
|
kotlin("multiplatform")
|
2022-09-10 16:58:45 +03:00
|
|
|
id("com.android.library")
|
2023-11-18 21:54:56 +03:00
|
|
|
id("dev.icerock.mobile.multiplatform-resources")
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
androidTarget()
|
|
|
|
sourceSets {
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
|
|
|
api(libs.moko.core)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val androidMain by getting {
|
|
|
|
dependsOn(commonMain) // https://github.com/icerockdev/moko-resources/issues/562
|
|
|
|
}
|
|
|
|
}
|
2022-09-10 16:58:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-01-22 18:37:13 +03:00
|
|
|
namespace = "tachiyomi.i18n"
|
2022-10-05 16:26:42 +03:00
|
|
|
|
2023-11-18 21:54:56 +03:00
|
|
|
sourceSets {
|
|
|
|
named("main") {
|
|
|
|
res.srcDir("src/commonMain/resources")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-05 16:26:42 +03:00
|
|
|
lint {
|
|
|
|
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
|
|
|
|
}
|
2022-09-10 16:58:45 +03:00
|
|
|
}
|
|
|
|
|
2023-11-18 21:54:56 +03:00
|
|
|
multiplatformResources {
|
|
|
|
multiplatformResourcesPackage = "tachiyomi.i18n"
|
|
|
|
}
|
|
|
|
|
2022-09-10 16:58:45 +03:00
|
|
|
tasks {
|
|
|
|
val localesConfigTask = registerLocalesConfigTask(project)
|
|
|
|
preBuild {
|
2023-11-18 21:54:56 +03:00
|
|
|
dependsOn(localesConfigTask)
|
2022-09-10 16:58:45 +03:00
|
|
|
}
|
2023-11-19 18:54:19 +03:00
|
|
|
|
|
|
|
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
|
|
|
kotlinOptions.freeCompilerArgs += listOf(
|
|
|
|
"-Xexpect-actual-classes",
|
|
|
|
)
|
|
|
|
}
|
2022-09-10 16:58:45 +03:00
|
|
|
}
|