2024-04-06 01:07:11 -04:00
|
|
|
import mihon.buildlogic.tasks.getLocalesConfigTask
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2022-09-10 09:58:45 -04:00
|
|
|
plugins {
|
2024-04-06 01:07:11 -04:00
|
|
|
id("mihon.library")
|
2023-11-18 13:54:56 -05:00
|
|
|
id("dev.icerock.mobile.multiplatform-resources")
|
2024-04-06 01:07:11 -04:00
|
|
|
kotlin("multiplatform")
|
2023-11-18 13:54:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
androidTarget()
|
2024-01-29 03:13:55 -05:00
|
|
|
|
|
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
|
2023-11-18 13:54:56 -05:00
|
|
|
sourceSets {
|
2024-06-20 16:43:48 -04:00
|
|
|
commonMain {
|
2023-11-18 13:54:56 -05:00
|
|
|
dependencies {
|
|
|
|
api(libs.moko.core)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-09-10 09:58:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-01-22 10:37:13 -05:00
|
|
|
namespace = "tachiyomi.i18n"
|
2022-10-05 09:26:42 -04:00
|
|
|
|
2023-11-18 13:54:56 -05:00
|
|
|
sourceSets {
|
|
|
|
named("main") {
|
|
|
|
res.srcDir("src/commonMain/resources")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-05 09:26:42 -04:00
|
|
|
lint {
|
|
|
|
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
|
|
|
|
}
|
2022-09-10 09:58:45 -04:00
|
|
|
}
|
|
|
|
|
2023-11-18 13:54:56 -05:00
|
|
|
multiplatformResources {
|
2024-06-20 16:43:48 -04:00
|
|
|
resourcesPackage.set("tachiyomi.i18n")
|
2023-11-18 13:54:56 -05:00
|
|
|
}
|
|
|
|
|
2022-09-10 09:58:45 -04:00
|
|
|
tasks {
|
2024-04-06 01:07:11 -04:00
|
|
|
val localesConfigTask = project.getLocalesConfigTask()
|
2022-09-10 09:58:45 -04:00
|
|
|
preBuild {
|
2023-11-18 13:54:56 -05:00
|
|
|
dependsOn(localesConfigTask)
|
2022-09-10 09:58:45 -04:00
|
|
|
}
|
2023-11-19 10:54:19 -05:00
|
|
|
|
2024-04-06 01:07:11 -04:00
|
|
|
withType<KotlinCompile> {
|
2024-06-06 17:48:35 -04:00
|
|
|
compilerOptions.freeCompilerArgs.addAll(
|
2023-11-19 10:54:19 -05:00
|
|
|
"-Xexpect-actual-classes",
|
|
|
|
)
|
|
|
|
}
|
2022-09-10 09:58:45 -04:00
|
|
|
}
|