mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
137 lines
3.5 KiB
Kotlin
137 lines
3.5 KiB
Kotlin
import org.jetbrains.compose.compose
|
|
|
|
@Suppress("DSL_SCOPE_VIOLATION")
|
|
plugins {
|
|
id(libs.plugins.kotlin.multiplatform.get().pluginId)
|
|
id(libs.plugins.kotlin.serialization.get().pluginId)
|
|
id(libs.plugins.android.library.get().pluginId)
|
|
id(libs.plugins.ksp.get().pluginId)
|
|
id(libs.plugins.buildkonfig.get().pluginId)
|
|
id(libs.plugins.kotlinter.get().pluginId)
|
|
}
|
|
|
|
kotlin {
|
|
androidTarget {
|
|
compilations {
|
|
all {
|
|
kotlinOptions.jvmTarget = Config.androidJvmTarget.toString()
|
|
}
|
|
}
|
|
}
|
|
jvm("desktop") {
|
|
compilations {
|
|
all {
|
|
kotlinOptions.jvmTarget = Config.desktopJvmTarget.toString()
|
|
}
|
|
}
|
|
}
|
|
iosX64()
|
|
iosArm64()
|
|
iosSimulatorArm64()
|
|
|
|
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
|
applyHierarchyTemplate {
|
|
common {
|
|
group("jvm") {
|
|
withAndroidTarget()
|
|
withJvm()
|
|
}
|
|
group("ios") {
|
|
withIosX64()
|
|
withIosArm64()
|
|
withIosSimulatorArm64()
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
all {
|
|
languageSettings {
|
|
optIn("kotlin.RequiresOptIn")
|
|
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
|
|
optIn("de.jensklingenberg.ktorfit.internal.InternalKtorfitApi")
|
|
}
|
|
}
|
|
val commonMain by getting {
|
|
dependencies {
|
|
api(kotlin("stdlib-common"))
|
|
api(kotlin("stdlib-common"))
|
|
api(libs.coroutines.core)
|
|
api(libs.serialization.json.core)
|
|
api(libs.serialization.json.okio)
|
|
api(libs.kotlinInject.runtime)
|
|
api(libs.ktor.core)
|
|
api(libs.ktor.contentNegotiation)
|
|
api(libs.ktor.serialization.json)
|
|
api(libs.ktor.auth)
|
|
api(libs.ktor.logging)
|
|
api(libs.ktor.websockets)
|
|
api(libs.ktorfit.lib)
|
|
api(libs.okio)
|
|
api(libs.dateTime)
|
|
api(compose("org.jetbrains.compose.runtime:runtime"))
|
|
api(projects.core)
|
|
api(projects.i18n)
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-common"))
|
|
implementation(kotlin("test-annotations-common"))
|
|
}
|
|
}
|
|
|
|
val jvmMain by getting {
|
|
dependencies {
|
|
api(kotlin("stdlib-jdk8"))
|
|
api(libs.ktor.okHttp)
|
|
}
|
|
}
|
|
val jvmTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
|
|
val desktopMain by getting {
|
|
}
|
|
val desktopTest by getting {
|
|
}
|
|
|
|
val androidMain by getting {
|
|
}
|
|
val androidUnitTest by getting {
|
|
}
|
|
|
|
val iosMain by getting {
|
|
dependencies {
|
|
api(libs.ktor.darwin)
|
|
}
|
|
}
|
|
val iosTest by getting {
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
listOf(
|
|
"kspCommonMainMetadata",
|
|
"kspDesktop",
|
|
"kspAndroid",
|
|
"kspIosArm64",
|
|
"kspIosSimulatorArm64",
|
|
"kspIosX64"
|
|
).forEach {
|
|
add(it, libs.kotlinInject.compiler)
|
|
add(it, libs.ktorfit.ksp)
|
|
}
|
|
}
|
|
|
|
buildkonfig {
|
|
packageName = "ca.gosyer.jui.domain.build"
|
|
}
|
|
|
|
android {
|
|
namespace = "ca.gosyer.jui.domain"
|
|
}
|