* chore: bump dependencies - androidx-media3 from 1.4.0 to 1.4.1 - androidx-work from 2.9.0 to 2.9.1 - AGP from 8.5.1 to 8.5.2 - Kotlin from 2.0.0 to 2.0.20 - KSP from 2.0.0-1.0.23 to 2.0.20-1.0.24 - Ktorfit from 2.0.0-rc01 to 2.0.1 * fix :core:api build script to include generated code * migrate DefaultServiceProvider to use new service factory methods
83 lines
2.2 KiB
Plaintext
83 lines
2.2 KiB
Plaintext
import com.google.devtools.ksp.gradle.KspTaskMetadata
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.android.library)
|
|
alias(libs.plugins.ktorfit)
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.kotlinx.serialization)
|
|
alias(libs.plugins.detekt)
|
|
}
|
|
|
|
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
|
kotlin {
|
|
applyDefaultHierarchyTemplate()
|
|
androidTarget {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_1_8)
|
|
}
|
|
}
|
|
listOf(
|
|
iosX64(),
|
|
iosArm64(),
|
|
iosSimulatorArm64(),
|
|
).forEach {
|
|
it.binaries.framework {
|
|
baseName = "core.api"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
dependencies {
|
|
implementation(libs.koin.core)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.ktorfit.lib)
|
|
implementation(libs.ktor.serialization)
|
|
implementation(libs.ktor.contentnegotiation)
|
|
implementation(libs.ktor.json)
|
|
implementation(libs.ktor.logging)
|
|
implementation(projects.core.utils)
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "com.livefast.eattrash.raccoonforlemmy.core.api"
|
|
compileSdk =
|
|
libs.versions.android.targetSdk
|
|
.get()
|
|
.toInt()
|
|
defaultConfig {
|
|
minSdk =
|
|
libs.versions.android.minSdk
|
|
.get()
|
|
.toInt()
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
add("kspCommonMainMetadata", libs.ktorfit.ksp)
|
|
add("kspAndroid", libs.ktorfit.ksp)
|
|
add("kspIosX64", libs.ktorfit.ksp)
|
|
add("kspIosArm64", libs.ktorfit.ksp)
|
|
add("kspIosSimulatorArm64", libs.ktorfit.ksp)
|
|
}
|
|
|
|
kotlin.sourceSets.commonMain {
|
|
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
dependsOn(tasks.withType<KspTaskMetadata>())
|
|
}
|