diff --git a/mirai-core-api/src/commonMain/kotlin/utils/BotConfiguration.kt b/mirai-core-api/src/commonMain/kotlin/utils/BotConfiguration.kt index 221ba3330..ee4837aaa 100644 --- a/mirai-core-api/src/commonMain/kotlin/utils/BotConfiguration.kt +++ b/mirai-core-api/src/commonMain/kotlin/utils/BotConfiguration.kt @@ -1,10 +1,10 @@ /* - * Copyright 2019-2021 Mamoe Technologies and contributors. + * Copyright 2019-2022 Mamoe Technologies and contributors. * - * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. - * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. + * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. + * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. * - * https://github.com/mamoe/mirai/blob/master/LICENSE + * https://github.com/mamoe/mirai/blob/dev/LICENSE */ @file:Suppress("unused", "DEPRECATION_ERROR", "EXPOSED_SUPER_CLASS", "MemberVisibilityCanBePrivate") @@ -63,6 +63,11 @@ public open class BotConfiguration { // open for Java * Json 序列化器, 使用 'kotlinx.serialization' */ @MiraiExperimentalApi + @Deprecated( + "Changing serial format is going to be forbidden. Deprecated for removal. ", + level = DeprecationLevel.ERROR + ) + @DeprecatedSinceMirai("") public var json: Json = kotlin.runCatching { Json { isLenient = true @@ -581,6 +586,7 @@ public open class BotConfiguration { // open for Java return BotConfiguration().also { new -> // To structural order new.workingDir = workingDir + @Suppress("DEPRECATION_ERROR") new.json = json new.parentCoroutineContext = parentCoroutineContext new.heartbeatPeriodMillis = heartbeatPeriodMillis diff --git a/mirai-core-api/src/commonMain/kotlin/utils/LoginSolver.kt b/mirai-core-api/src/commonMain/kotlin/utils/LoginSolver.kt index 0f6216fe9..a3c09cc39 100644 --- a/mirai-core-api/src/commonMain/kotlin/utils/LoginSolver.kt +++ b/mirai-core-api/src/commonMain/kotlin/utils/LoginSolver.kt @@ -1,10 +1,10 @@ /* - * Copyright 2019-2021 Mamoe Technologies and contributors. + * Copyright 2019-2022 Mamoe Technologies and contributors. * - * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. - * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. + * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. + * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. * - * https://github.com/mamoe/mirai/blob/master/LICENSE + * https://github.com/mamoe/mirai/blob/dev/LICENSE */ package net.mamoe.mirai.utils @@ -84,6 +84,7 @@ public expect abstract class LoginSolver() { internal fun BotConfiguration.getFileBasedDeviceInfoSupplier(file: () -> File): (Bot) -> DeviceInfo { return { + @Suppress("DEPRECATION_ERROR") file().loadAsDeviceInfo(json) } } \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/network/components/ContactCacheService.kt b/mirai-core/src/commonMain/kotlin/network/components/ContactCacheService.kt index 9cc04c711..bdd36af34 100644 --- a/mirai-core/src/commonMain/kotlin/network/components/ContactCacheService.kt +++ b/mirai-core/src/commonMain/kotlin/network/components/ContactCacheService.kt @@ -1,10 +1,10 @@ /* - * Copyright 2019-2021 Mamoe Technologies and contributors. + * Copyright 2019-2022 Mamoe Technologies and contributors. * - * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. - * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. + * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. + * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link. * - * https://github.com/mamoe/mirai/blob/master/LICENSE + * https://github.com/mamoe/mirai/blob/dev/LICENSE */ package net.mamoe.mirai.internal.network.components @@ -43,6 +43,7 @@ internal class ContactCacheServiceImpl( // contact cache /////////////////////////////////////////////////////////////////////////// + @Suppress("DEPRECATION_ERROR") inline val json get() = configuration.json override val friendListCache: FriendListCache? by lazy {