From ef439f1deae1231efadfc61afd9bc03e5dd95eba Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Mon, 7 Jun 2021 12:33:31 +0800 Subject: [PATCH] Fix API check --- .../api/binary-compatibility-validator.api | 3 --- build.gradle.kts | 1 + .../src/commonMain/kotlin/utils/Annotations.kt | 11 +++++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/binary-compatibility-validator/api/binary-compatibility-validator.api b/binary-compatibility-validator/api/binary-compatibility-validator.api index 0f6c5f705..d8f45622a 100644 --- a/binary-compatibility-validator/api/binary-compatibility-validator.api +++ b/binary-compatibility-validator/api/binary-compatibility-validator.api @@ -2870,9 +2870,6 @@ public abstract class net/mamoe/mirai/event/events/UserMessagePreSendEvent : net public abstract fun getTarget ()Lnet/mamoe/mirai/contact/User; } -public final class net/mamoe/mirai/kar/SwingxLoaderKt { -} - public final class net/mamoe/mirai/message/MessageEventKt { public static final fun isContextIdenticalWith (Lnet/mamoe/mirai/event/events/MessageEvent;Lnet/mamoe/mirai/event/events/MessageEvent;)Z } diff --git a/build.gradle.kts b/build.gradle.kts index a2405b9bd..be00a3231 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,6 +52,7 @@ configure { ignoredPackages.add("net.mamoe.mirai.internal") ignoredPackages.add("net.mamoe.mirai.console.internal") nonPublicMarkers.add("net.mamoe.mirai.utils.MiraiInternalApi") + nonPublicMarkers.add("net.mamoe.mirai.utils.MiraiInternalFile") nonPublicMarkers.add("net.mamoe.mirai.console.utils.ConsoleInternalApi") nonPublicMarkers.add("net.mamoe.mirai.console.utils.ConsoleExperimentalApi") nonPublicMarkers.add("net.mamoe.mirai.utils.MiraiExperimentalApi") diff --git a/mirai-core-api/src/commonMain/kotlin/utils/Annotations.kt b/mirai-core-api/src/commonMain/kotlin/utils/Annotations.kt index 32166eb31..23ea3cb41 100644 --- a/mirai-core-api/src/commonMain/kotlin/utils/Annotations.kt +++ b/mirai-core-api/src/commonMain/kotlin/utils/Annotations.kt @@ -28,6 +28,17 @@ public annotation class MiraiInternalApi( public val message: String = "" ) +/** + * 标记为一个仅供 Mirai 内部使用的 API. + * + * 这些 API 可能会在任意时刻更改, 且不会发布任何预警. + * 非常不建议在发行版本中使用这些 API. + */ +@Retention(AnnotationRetention.BINARY) +@Target(FILE) +@MiraiInternalApi +public annotation class MiraiInternalFile + /** * 标记这个类, 类型, 函数, 属性, 字段, 或构造器为实验性的 API. *