mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-24 21:58:34 +03:00
32ce7e4407
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
60 lines
1.2 KiB
Text
60 lines
1.2 KiB
Text
import mihon.buildlogic.generatedBuildDir
|
|
import mihon.buildlogic.tasks.getLocalesConfigTask
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
id("mihon.library")
|
|
kotlin("multiplatform")
|
|
alias(libs.plugins.moko)
|
|
}
|
|
|
|
kotlin {
|
|
androidTarget()
|
|
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
api(libs.moko.core)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
val generatedAndroidResourceDir = generatedBuildDir.resolve("android/res")
|
|
|
|
android {
|
|
namespace = "tachiyomi.i18n"
|
|
|
|
sourceSets {
|
|
val main by getting
|
|
main.res.srcDirs(
|
|
"src/commonMain/resources",
|
|
generatedAndroidResourceDir,
|
|
)
|
|
}
|
|
|
|
lint {
|
|
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
|
|
}
|
|
}
|
|
|
|
multiplatformResources {
|
|
resourcesPackage.set("tachiyomi.i18n")
|
|
}
|
|
|
|
tasks {
|
|
val localesConfigTask = project.getLocalesConfigTask(generatedAndroidResourceDir)
|
|
preBuild {
|
|
dependsOn(localesConfigTask)
|
|
}
|
|
|
|
withType<KotlinCompile> {
|
|
compilerOptions.freeCompilerArgs.addAll(
|
|
listOf(
|
|
"-Xexpect-actual-classes",
|
|
),
|
|
)
|
|
}
|
|
}
|