Skip to content

Commit f7d2147

Browse files
committed
🚑
1 parent c39b29e commit f7d2147

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

next/kmp/app/androidApp/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ android {
142142
// signingConfig = signingConfigs.getByName("debug") // 如果是测试benchmark需要使用debug
143143
signingConfig = signingConfigs.getByName("release")
144144
isMinifyEnabled = true // 开启代码混淆
145-
// setProguardFiles(listOf("proguard-rules.pro"))
146-
setProguardFiles(emptyList<String>())
145+
setProguardFiles(listOf("proguard-rules.pro"))
146+
// setProguardFiles(emptyList<String>())
147147
isShrinkResources = true // 移除无用的resource
148148
configChannel(buildChannel, this)
149149
manifestPlaceholders["isTestOnly"] = "false"

next/kmp/browser/src/commonMain/kotlin/org/dweb_browser/browser/scan/SmartScanNMM.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.dweb_browser.browser.scan
22

33
import io.ktor.http.HttpStatusCode
4-
import io.ktor.utils.io.CancellationException
4+
import kotlinx.coroutines.CancellationException
55
import org.dweb_browser.browser.BrowserI18nResource
66
import org.dweb_browser.core.help.types.DwebPermission
77
import org.dweb_browser.core.help.types.MICRO_MODULE_CATEGORY

next/kmp/buildSrc/src/main/kotlin/Multiplatform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fun KotlinCompilation<*>.configureCompilation() {
4040
freeCompilerArgs.addAll(
4141
"-Xexpect-actual-classes",
4242
"-Xcontext-receivers",
43-
"-XXLanguage:+ExplicitBackingFields",
43+
// "-XXLanguage:+ExplicitBackingFields",
4444
)
4545
}
4646
}

next/kmp/core/src/commonMain/kotlin/org/dweb_browser/core/std/http/HttpNMM.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import io.ktor.http.Url
77
import io.ktor.http.hostWithPort
88
import io.ktor.http.protocolWithAuthority
99
import io.ktor.util.decodeBase64String
10-
import io.ktor.utils.io.CancellationException
10+
import kotlinx.coroutines.CancellationException
1111
import kotlinx.coroutines.launch
1212
import kotlinx.serialization.json.Json
1313
import org.dweb_browser.core.help.types.MICRO_MODULE_CATEGORY
@@ -638,9 +638,9 @@ class HttpNMM : NativeMicroModule("http.std.dweb", "HTTP Server Provider") {
638638
val x_dweb_host = query_x_dweb_host ?: header_auth_host ?: header_x_dweb_host ?: header_host
639639
return x_dweb_host?.let { host ->
640640
val isWs = request.isWebSocket
641-
val protocol = when (is_https) {
642-
true -> if (isWs) URLProtocol.WSS else URLProtocol.HTTPS
643-
false -> if (isWs) URLProtocol.WS else URLProtocol.HTTP
641+
val protocol = when {
642+
is_https -> if (isWs) URLProtocol.WSS else URLProtocol.HTTPS
643+
else -> if (isWs) URLProtocol.WS else URLProtocol.HTTP
644644
}
645645
DwebGatewayInfo(host, protocol)
646646
}

next/kmp/pureHttp/src/ktorMain/kotlin/org/dweb_browser/pure/http/ktor/KtorPureServer.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import io.ktor.server.response.respond
1515
import io.ktor.server.websocket.WebSocketUpgrade
1616
import io.ktor.server.websocket.WebSockets
1717
import io.ktor.util.logging.KtorSimpleLogger
18-
import io.ktor.utils.io.CancellationException
1918
import io.ktor.websocket.Frame
2019
import io.ktor.websocket.close
20+
import kotlinx.coroutines.CancellationException
2121
import kotlinx.coroutines.CompletableDeferred
2222
import kotlinx.coroutines.CoroutineStart
2323
import kotlinx.coroutines.channels.Channel
@@ -133,8 +133,7 @@ open class KtorPureServer<out TEngine : ApplicationEngine, TConfiguration : Appl
133133

134134
protected open fun getCoroutineExceptionHandler(): CoroutineContext = commonAsyncExceptionHandler
135135

136-
protected suspend inline fun startServer(createServer: () -> ApplicationEngine) =
137-
serverLock.withLock {
136+
protected suspend inline fun startServer(createServer: () -> ApplicationEngine) = serverLock.withLock {
138137
val engine = when (val engine = serverEngine) {
139138
null -> {
140139
createServer().also { newEngine ->

0 commit comments

Comments
 (0)