mihon/i18n/build.gradle.kts

58 lines
1.2 KiB
Plaintext
Raw Normal View History

import mihon.buildlogic.generatedBuildDir
import mihon.buildlogic.tasks.getLocalesConfigTask
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
plugins {
id("mihon.library")
kotlin("multiplatform")
alias(libs.plugins.moko)
}
kotlin {
androidTarget()
applyDefaultHierarchyTemplate()
sourceSets {
commonMain {
dependencies {
api(libs.moko.core)
}
}
}
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
val generatedAndroidResourceDir = generatedBuildDir.resolve("android/res")
android {
2023-01-22 16:37:13 +01:00
namespace = "tachiyomi.i18n"
2022-10-05 15:26:42 +02:00
sourceSets {
val main by getting
main.res.srcDirs(
"src/commonMain/resources",
generatedAndroidResourceDir,
)
}
2022-10-05 15:26:42 +02:00
lint {
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
}
}
multiplatformResources {
resourcesPackage.set("tachiyomi.i18n")
}
tasks {
val localesConfigTask = project.getLocalesConfigTask(generatedAndroidResourceDir)
preBuild {
dependsOn(localesConfigTask)
}
}