Update all dependencies

This commit is contained in:
Syer10
2023-12-01 19:21:07 -05:00
parent 30f43412d4
commit 2c088a3a7e
40 changed files with 385 additions and 431 deletions

View File

@@ -11,7 +11,7 @@ plugins {
}
kotlin {
android {
androidTarget {
compilations {
all {
kotlinOptions.jvmTarget = Config.androidJvmTarget.toString()
@@ -29,6 +29,21 @@ kotlin {
iosArm64()
iosSimulatorArm64()
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
applyHierarchyTemplate {
common {
group("jvm") {
withAndroidTarget()
withJvm()
}
group("ios") {
withIosX64()
withIosArm64()
withIosSimulatorArm64()
}
}
}
sourceSets {
all {
languageSettings {
@@ -66,51 +81,34 @@ kotlin {
}
}
val jvmMain by creating {
dependsOn(commonMain)
val jvmMain by getting {
dependencies {
api(kotlin("stdlib-jdk8"))
api(libs.ktor.okHttp)
}
}
val jvmTest by creating {
dependsOn(commonTest)
val jvmTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val desktopMain by getting {
dependsOn(jvmMain)
}
val desktopTest by getting {
dependsOn(jvmTest)
}
val androidMain by getting {
dependsOn(jvmMain)
}
val androidUnitTest by getting {
dependsOn(jvmTest)
}
val iosMain by creating {
dependsOn(commonMain)
val iosMain by getting {
dependencies {
api(libs.ktor.darwin)
}
}
val iosTest by creating {
dependsOn(commonTest)
}
listOf(
"iosX64",
"iosArm64",
"iosSimulatorArm64",
).forEach {
getByName(it + "Main").dependsOn(iosMain)
getByName(it + "Test").dependsOn(iosTest)
val iosTest by getting {
}
}
}

View File

@@ -21,6 +21,7 @@ import io.ktor.client.plugins.auth.providers.DigestAuthCredentials
import io.ktor.client.plugins.auth.providers.basic
import io.ktor.client.plugins.auth.providers.digest
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.client.plugins.defaultRequest
import io.ktor.client.plugins.logging.LogLevel
import io.ktor.client.plugins.logging.Logger
import io.ktor.client.plugins.logging.Logging
@@ -49,6 +50,10 @@ fun httpClient(
expectSuccess = true
defaultRequest {
url(serverPreferences.serverUrl().get().toString())
}
engine {
proxy = when (serverPreferences.proxy().get()) {
Proxy.NO_PROXY -> null