Honestly metro looks too overcomplicated and I still don't know how to use it properly. Switching to koin for now as I'm more comfortable with it.
78 lines
1.9 KiB
Kotlin
78 lines
1.9 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.androidLibrary)
|
|
alias(libs.plugins.koinCompiler)
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.kotlinSerialization)
|
|
alias(libs.plugins.sqldelight)
|
|
}
|
|
|
|
kotlin {
|
|
jvm()
|
|
androidTarget {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_11)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.client.websockets)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
|
|
implementation(project.dependencies.platform(libs.koin.bom))
|
|
implementation(libs.koin.core)
|
|
|
|
implementation(libs.kermit)
|
|
implementation(libs.settings)
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
jvmMain.dependencies {
|
|
implementation(libs.ktor.client.okhttp)
|
|
}
|
|
androidMain.dependencies {
|
|
implementation(libs.ktor.client.okhttp)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
coreLibraryDesugaring(libs.desugar)
|
|
}
|
|
|
|
android {
|
|
namespace = "moe.lava.neon.core"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
buildTypes {
|
|
getByName("release") {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
isCoreLibraryDesugaringEnabled = true
|
|
}
|
|
}
|
|
|
|
sqldelight {
|
|
databases {
|
|
create("Database") {
|
|
packageName = "moe.lava.neon.core.db"
|
|
}
|
|
}
|
|
}
|