mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-03 11:07:30 +01:00
9faa6136fa
closes #524
84 lines
2.1 KiB
Plaintext
84 lines
2.1 KiB
Plaintext
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.android.library)
|
|
alias(libs.plugins.compose)
|
|
alias(libs.plugins.ksp)
|
|
}
|
|
|
|
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
|
kotlin {
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
androidTarget {
|
|
compilations.all {
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
}
|
|
}
|
|
listOf(
|
|
iosX64(),
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach {
|
|
it.binaries.framework {
|
|
baseName = "l10n"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
|
|
dependencies {
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material)
|
|
implementation(compose.material3)
|
|
|
|
implementation(libs.koin.core)
|
|
implementation(libs.lyricist)
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "com.github.diegoberaldin.raccoonforlemmy.core.commonui.l10n"
|
|
compileSdk = libs.versions.android.targetSdk.get().toInt()
|
|
defaultConfig {
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
add("kspCommonMainMetadata", libs.lyricist.ksp)
|
|
}
|
|
|
|
ksp {
|
|
arg(
|
|
"lyricist.xml.resourcesPath",
|
|
kotlin.sourceSets.findByName("androidMain")?.resources?.srcDirs
|
|
?.first()?.absolutePath.orEmpty()
|
|
.replace(
|
|
"androidMain/resources",
|
|
"androidMain/res",
|
|
),
|
|
)
|
|
arg("lyricist.packageName", "com.github.diegoberaldin.raccoonforlemmy.core.l10n")
|
|
arg("lyricist.xml.moduleName", "xml")
|
|
arg("lyricist.xml.defaultLanguageTag", "en")
|
|
}
|
|
|
|
tasks.withType<KotlinCompile<*>>().configureEach {
|
|
if (name != "kspCommonMainKotlinMetadata") {
|
|
dependsOn("kspCommonMainKotlinMetadata")
|
|
}
|
|
}
|