58 lines
1.2 KiB
Kotlin
58 lines
1.2 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.androidLibrary)
|
|
}
|
|
|
|
kotlin {
|
|
kotlin.applyDefaultHierarchyTemplate()
|
|
|
|
androidTarget()
|
|
|
|
androidTarget {
|
|
compilations.all {
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
}
|
|
}
|
|
|
|
listOf(
|
|
iosX64(),
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach {
|
|
it.binaries.framework {
|
|
baseName = "shared"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
//Fix for: https://stackoverflow.com/a/69626787
|
|
all {
|
|
languageSettings.optIn("io.ktor.util.InternalAPI")
|
|
}
|
|
|
|
dependencies {
|
|
|
|
}
|
|
kotlin.srcDir(layout.buildDirectory.dir("/generate-resources/main/src/"))
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
}
|
|
logger.info("${commonMain.name} ${commonTest.name}")
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "cl.carlost.kmpexcercises"
|
|
compileSdk = 34
|
|
defaultConfig {
|
|
minSdk = 24
|
|
}
|
|
}
|