2023-07-23 11:41:01 +02:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
|
|
alias(libs.plugins.android.library)
|
|
|
|
alias(libs.plugins.ktorfit)
|
|
|
|
alias(libs.plugins.ksp)
|
|
|
|
alias(libs.plugins.kotlinx.serialization)
|
|
|
|
}
|
|
|
|
|
|
|
|
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
|
|
|
|
kotlin {
|
2023-12-04 19:36:34 +01:00
|
|
|
applyDefaultHierarchyTemplate()
|
2023-07-23 11:41:01 +02:00
|
|
|
|
2023-09-23 08:42:30 +02:00
|
|
|
androidTarget {
|
2023-07-23 11:41:01 +02:00
|
|
|
compilations.all {
|
|
|
|
kotlinOptions {
|
2023-08-03 23:13:38 +02:00
|
|
|
jvmTarget = "1.8"
|
2023-07-23 11:41:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-27 23:27:38 +02:00
|
|
|
listOf(
|
|
|
|
iosX64(),
|
|
|
|
iosArm64(),
|
|
|
|
iosSimulatorArm64()
|
|
|
|
).forEach {
|
|
|
|
it.binaries.framework {
|
2023-12-20 11:54:52 +01:00
|
|
|
baseName = "api"
|
2023-09-27 23:27:38 +02:00
|
|
|
}
|
|
|
|
}
|
2023-07-23 11:41:01 +02:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(libs.koin.core)
|
2023-07-28 23:59:08 +02:00
|
|
|
api(libs.ktorfit.lib)
|
2023-07-23 11:41:01 +02:00
|
|
|
implementation(libs.ktor.serialization)
|
2024-02-27 18:28:48 +01:00
|
|
|
implementation(libs.kotlinx.serialization.json)
|
2023-07-23 11:41:01 +02:00
|
|
|
implementation(libs.ktor.contentnegotiation)
|
|
|
|
implementation(libs.ktor.json)
|
2023-07-25 20:54:43 +02:00
|
|
|
implementation(libs.ktor.logging)
|
2023-12-20 00:45:20 +01:00
|
|
|
implementation(projects.core.utils)
|
2023-07-23 11:41:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-08-02 23:37:12 +02:00
|
|
|
namespace = "com.github.diegoberaldin.raccoonforlemmy.core.api"
|
2023-09-23 08:42:30 +02:00
|
|
|
compileSdk = libs.versions.android.targetSdk.get().toInt()
|
2023-07-23 11:41:01 +02:00
|
|
|
defaultConfig {
|
2023-09-23 08:42:30 +02:00
|
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
2023-07-23 11:41:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-02-09 21:59:58 +01:00
|
|
|
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)
|
2023-08-02 23:37:12 +02:00
|
|
|
}
|