4 Commits

Author SHA1 Message Date
283444e0d5 chore: bump gradle to 8.14.3 2025-08-19 13:55:27 +08:00
b4fdbe6ad9 refactor: some tweaks in HttpFactory 2025-08-19 13:55:16 +08:00
0ae3f9a748 chore: update project files 2025-08-19 13:48:44 +08:00
a836ad9289 chore: bump dependencies 2025-08-19 13:48:36 +08:00
4 changed files with 7 additions and 7 deletions

2
.idea/kotlinc.xml generated
View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="2.1.10" />
<option name="version" value="2.2.10" />
</component>
</project>

View File

@@ -12,18 +12,18 @@ repositories:
plugins:
org.jetbrains.kotlin.jvm:
alias: kotlin-jvm
version: 2.1.10
version: 2.2.10
com.vanniktech.maven.publish:
alias: maven-publish
version: 0.31.0
version: 0.34.0
libraries:
com.squareup.okhttp3:
okhttp:
version: 4.12.0
version: 5.1.0
com.squareup:
kotlinpoet:
version: 2.1.0
version: 2.2.0
javapoet:
version: 1.13.0
net.lingala.zip4j:

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -52,7 +52,7 @@ internal fun String.executeUrlBody(username: String = "", password: String = "",
else -> SError.make("Invalid URL: $this")
}).get().build()
).execute().let {
if (it.code == 200 || it.code == 404) it.body?.string() ?: ""
if (it.code == 200 || it.code == 404) it.body.string()
else SError.make("Request failed with code ${it.code}")
}
}.onFailure { if (isShowFailure) SLog.error("Failed to connect to $this\n$it") }.getOrNull() ?: ""