2025-01-30 10:29:19 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
2022-08-22 12:55:50 +00:00
|
|
|
plugins {
|
|
|
|
|
kotlin("multiplatform")
|
2025-01-30 10:29:19 +00:00
|
|
|
alias(libs.plugins.android.library)
|
2022-08-22 12:55:50 +00:00
|
|
|
id("kotlin-parcelize")
|
2025-01-30 10:29:19 +00:00
|
|
|
alias(libs.plugins.ksp)
|
|
|
|
|
alias(libs.plugins.habitrpg.convention)
|
|
|
|
|
alias(libs.plugins.kotest)
|
2022-08-22 12:55:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlin {
|
2025-01-30 10:29:19 +00:00
|
|
|
androidTarget()
|
2024-04-23 15:34:59 +00:00
|
|
|
iosX64()
|
|
|
|
|
iosArm64()
|
|
|
|
|
iosSimulatorArm64()
|
2022-08-22 12:55:50 +00:00
|
|
|
|
2024-03-28 08:31:23 +00:00
|
|
|
js(IR) {
|
|
|
|
|
browser()
|
|
|
|
|
nodejs()
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-22 12:55:50 +00:00
|
|
|
sourceSets {
|
2024-04-23 15:34:59 +00:00
|
|
|
commonMain {
|
2022-08-22 12:55:50 +00:00
|
|
|
dependencies {
|
2025-01-30 10:29:19 +00:00
|
|
|
implementation(libs.kotlinx.coroutine)
|
2022-08-22 12:55:50 +00:00
|
|
|
}
|
|
|
|
|
}
|
2024-04-23 15:34:59 +00:00
|
|
|
commonTest {
|
2022-08-22 12:55:50 +00:00
|
|
|
dependencies {
|
2023-02-13 16:29:12 +00:00
|
|
|
implementation(kotlin("test")) // This brings all the platform dependencies automatically
|
2022-08-22 12:55:50 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
android {
|
2025-01-30 10:29:19 +00:00
|
|
|
compileSdk = libs.versions.targetSdk.get().toInt()
|
|
|
|
|
namespace = "com.habitrpg.shared.habitica"
|
2022-08-22 12:55:50 +00:00
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
2025-01-30 10:29:19 +00:00
|
|
|
defaultConfig.minSdk = 21
|
2023-01-09 15:35:04 +00:00
|
|
|
|
|
|
|
|
buildTypes {
|
2024-06-04 09:23:14 +00:00
|
|
|
create("debugIAP") {
|
|
|
|
|
initWith(buildTypes["debug"])
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
isJniDebuggable = true
|
|
|
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
|
|
|
}
|
2023-01-09 15:35:04 +00:00
|
|
|
}
|
|
|
|
|
|
2023-04-27 09:25:23 +00:00
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
|
}
|
2023-02-13 16:34:54 +00:00
|
|
|
}
|
2025-01-30 10:29:19 +00:00
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
|
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
|
|
|
|
|
}
|