Открыть боковую панель
Aurora OS
Kotlin Multiplatform
Libraries
ktor
Коммиты
47326f72
Не подтверждена
Коммит
47326f72
создал
Фев 06, 2025
по автору
Anton Erofeev
Зафиксировано автором
GitHub
Фев 06, 2025
Просмотр файлов
Remove use of Platform.isExperimentalMM (#4646)
владелец
4122cac3
Изменения
4
Скрыть пробелы
Построчно
Рядом
ktor-utils/common/src/io/ktor/util/PlatformUtils.kt
Просмотр файла @
47326f72
/*
* Copyright 2014-202
1
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
* Copyright 2014-202
5
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.util
...
...
@@ -23,11 +23,15 @@ public object PlatformUtils {
public
val
IS_DEVELOPMENT_MODE
:
Boolean
=
isDevelopmentMode
public
val
IS_NEW_MM_ENABLED
:
Boolean
=
isNewMemoryModel
@Deprecated
(
"New memory model is now enabled by default. The property will be removed in the future."
,
level
=
DeprecationLevel
.
WARNING
,
replaceWith
=
ReplaceWith
(
"true"
)
)
public
val
IS_NEW_MM_ENABLED
:
Boolean
=
true
}
internal
expect
val
PlatformUtils
.
isDevelopmentMode
:
Boolean
internal
expect
val
PlatformUtils
.
isNewMemoryModel
:
Boolean
public
expect
val
PlatformUtils
.
platform
:
Platform
...
...
ktor-utils/jsAndWasmShared/src/io/ktor/util/PlatformUtilsJs.kt
Просмотр файла @
47326f72
/*
* Copyright 2014-202
4
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2014-202
5
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.util
...
...
@@ -7,9 +7,6 @@ package io.ktor.util
internal
actual
val
PlatformUtils
.
isDevelopmentMode
:
Boolean
get
()
=
false
internal
actual
val
PlatformUtils
.
isNewMemoryModel
:
Boolean
get
()
=
true
internal
fun
hasNodeApi
():
Boolean
=
js
(
"""
(typeof process !== 'undefined'
...
...
ktor-utils/jvm/src/io/ktor/util/PlatformUtilsJvm.kt
Просмотр файла @
47326f72
/*
* Copyright 2014-202
1
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
* Copyright 2014-202
5
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.util
...
...
@@ -11,6 +11,3 @@ public actual val PlatformUtils.platform: Platform
internal
actual
val
PlatformUtils
.
isDevelopmentMode
:
Boolean
get
()
=
System
.
getProperty
(
DEVELOPMENT_MODE_KEY
)
?.
toBoolean
()
==
true
internal
actual
val
PlatformUtils
.
isNewMemoryModel
:
Boolean
get
()
=
true
ktor-utils/posix/src/io/ktor/util/PlatformUtilsNative.kt
Просмотр файла @
47326f72
/*
* Copyright 2014-202
4
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2014-202
5
JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package
io.ktor.util
...
...
@@ -7,9 +7,5 @@ package io.ktor.util
internal
actual
val
PlatformUtils
.
isDevelopmentMode
:
Boolean
get
()
=
false
@OptIn
(
ExperimentalStdlibApi
::
class
)
internal
actual
val
PlatformUtils
.
isNewMemoryModel
:
Boolean
get
()
=
isExperimentalMM
()
public
actual
val
PlatformUtils
.
platform
:
Platform
get
()
=
Platform
.
Native
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать