2023-10-10 20:52:26 +00:00
|
|
|
val ktorVersion = "2.3.2"
|
|
|
|
|
2022-08-23 13:12:01 +00:00
|
|
|
object SqlDelight {
|
2022-10-30 21:02:07 +00:00
|
|
|
const val runtime = "com.squareup.sqldelight:runtime:1.5.4"
|
|
|
|
const val android = "com.squareup.sqldelight:android-driver:1.5.4"
|
|
|
|
const val native = "com.squareup.sqldelight:native-driver:1.5.4"
|
2022-08-23 13:12:01 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-03-22 14:35:23 +00:00
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform")
|
|
|
|
id("com.android.library")
|
2022-08-23 13:12:01 +00:00
|
|
|
id("com.squareup.sqldelight")
|
2023-10-10 20:52:26 +00:00
|
|
|
kotlin("plugin.serialization") version "1.9.0"
|
|
|
|
id("org.jetbrains.kotlinx.kover")
|
2022-03-22 14:35:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
2023-10-10 20:52:26 +00:00
|
|
|
androidTarget()
|
2022-03-22 14:35:23 +00:00
|
|
|
|
|
|
|
listOf(
|
|
|
|
iosX64(),
|
|
|
|
iosArm64(),
|
2022-10-28 18:32:23 +00:00
|
|
|
// iosSimulatorArm64()
|
2022-03-22 14:35:23 +00:00
|
|
|
).forEach {
|
|
|
|
it.binaries.framework {
|
|
|
|
baseName = "shared"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
2023-10-10 20:52:26 +00:00
|
|
|
implementation("io.ktor:ktor-client-core:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-client-logging:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-client-auth:$ktorVersion")
|
|
|
|
implementation("io.ktor:ktor-client-cio:$ktorVersion")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
|
|
|
|
|
|
|
|
implementation("org.jsoup:jsoup:1.15.4")
|
2022-07-17 23:28:56 +00:00
|
|
|
|
|
|
|
//Dependency Injection
|
2023-10-10 20:52:26 +00:00
|
|
|
implementation("org.kodein.di:kodein-di:7.14.0")
|
2022-07-18 21:25:10 +00:00
|
|
|
|
|
|
|
//Settings
|
2022-10-28 18:32:23 +00:00
|
|
|
implementation("com.russhwolf:multiplatform-settings-no-arg:1.0.0-RC")
|
2022-07-18 21:25:10 +00:00
|
|
|
|
|
|
|
//Logging
|
|
|
|
implementation("io.github.aakira:napier:2.6.1")
|
2022-08-17 12:51:00 +00:00
|
|
|
|
2022-08-23 13:12:01 +00:00
|
|
|
// Sql
|
|
|
|
implementation(SqlDelight.runtime)
|
2024-12-21 19:32:58 +00:00
|
|
|
|
|
|
|
// Sql
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
|
2022-03-22 14:35:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test-common"))
|
|
|
|
implementation(kotlin("test-annotations-common"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val androidMain by getting {
|
|
|
|
dependencies {
|
2023-10-10 20:52:26 +00:00
|
|
|
implementation("com.squareup.okhttp3:okhttp:4.11.0")
|
|
|
|
implementation("io.ktor:ktor-client-okhttp:2.2.4")
|
2022-10-29 18:50:44 +00:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
2022-08-23 13:12:01 +00:00
|
|
|
|
|
|
|
// Sql
|
|
|
|
implementation(SqlDelight.android)
|
2022-03-22 14:35:23 +00:00
|
|
|
}
|
|
|
|
}
|
2023-10-10 20:52:26 +00:00
|
|
|
val androidUnitTest by getting {
|
2022-03-22 14:35:23 +00:00
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test-junit"))
|
|
|
|
implementation("junit:junit:4.13.2")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val iosX64Main by getting
|
|
|
|
val iosArm64Main by getting
|
2022-10-28 18:32:23 +00:00
|
|
|
// val iosSimulatorArm64Main by getting
|
2022-03-22 14:35:23 +00:00
|
|
|
val iosMain by creating {
|
2022-08-23 13:12:01 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(SqlDelight.native)
|
2022-10-22 18:47:38 +00:00
|
|
|
implementation("io.ktor:ktor-client-ios:2.1.1")
|
2022-08-23 13:12:01 +00:00
|
|
|
}
|
2022-03-22 14:35:23 +00:00
|
|
|
}
|
|
|
|
val iosX64Test by getting
|
|
|
|
val iosArm64Test by getting
|
2022-10-28 18:32:23 +00:00
|
|
|
// val iosSimulatorArm64Test by getting
|
2022-03-22 14:35:23 +00:00
|
|
|
val iosTest by creating {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-10-10 20:52:26 +00:00
|
|
|
compileSdk = 34
|
2022-03-22 14:35:23 +00:00
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
|
|
defaultConfig {
|
2023-10-10 20:52:26 +00:00
|
|
|
minSdk = 25
|
2022-03-22 14:35:23 +00:00
|
|
|
}
|
2022-08-17 08:43:56 +00:00
|
|
|
compileOptions {
|
2023-10-10 20:52:26 +00:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2022-08-17 08:43:56 +00:00
|
|
|
}
|
2022-09-24 11:54:48 +00:00
|
|
|
namespace = "bou.amine.apps.readerforselfossv2"
|
2022-08-23 13:12:01 +00:00
|
|
|
}
|
|
|
|
|
2022-10-22 18:47:38 +00:00
|
|
|
|
|
|
|
|
2022-08-23 13:12:01 +00:00
|
|
|
sqldelight {
|
|
|
|
database("ReaderForSelfossDB") {
|
|
|
|
packageName = "bou.amine.apps.readerforselfossv2.dao"
|
|
|
|
sourceFolders = listOf("sqldelight")
|
|
|
|
}
|
2022-10-22 18:47:38 +00:00
|
|
|
}
|