diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt index 1948c7b9a..96a013405 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt @@ -34,6 +34,7 @@ public interface JvmPluginDescription : PluginDescription { * 构建 [JvmPluginDescription] * @see JvmPluginDescriptionBuilder */ + @JvmName("create") @JvmSynthetic public operator fun invoke( /** @@ -55,8 +56,7 @@ public interface JvmPluginDescription : PluginDescription { * 构建 [JvmPluginDescription] * @see JvmPluginDescriptionBuilder */ - @Suppress("DEPRECATION_ERROR") - @Deprecated("Semver 将会在 1.0-RC 被替换为 Console 自己实现的版本。请临时使用 String。", level = DeprecationLevel.ERROR) + @JvmName("create") @JvmSynthetic public operator fun invoke( /** @@ -101,9 +101,8 @@ public class JvmPluginDescriptionBuilder( private var id: String, private var version: SemVersion, ) { - @Suppress("DEPRECATION_ERROR") public constructor( - @ResolveContext(PLUGIN_NAME) id: String, + @ResolveContext(PLUGIN_ID) id: String, @ResolveContext(PLUGIN_VERSION) version: String, ) : this(id, SemVersion(version)) @@ -232,49 +231,19 @@ public class JvmPluginDescriptionBuilder( * * @see JvmPluginDescription */ -@Deprecated( - """ - 将在 1.0-RC 删除. 请使用 JvmPluginDescription. -""", - replaceWith = ReplaceWith( - "JvmPluginDescription", - "net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription" - ), - level = DeprecationLevel.ERROR -) -public data class SimpleJvmPluginDescription -@Deprecated( - """ - 构造器不稳定, 将在 1.0-RC 删除. 请使用 JvmPluginDescriptionBuilder. -""", - replaceWith = ReplaceWith( - "JvmPluginDescription(name, version) {}", - "net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription.Companion.invoke" - ), - level = DeprecationLevel.ERROR -) -@JvmOverloads public constructor( - public override val name: String, - public override val version: SemVersion, - public override val id: String = name, - public override val author: String = "", - public override val info: String = "", - public override val dependencies: Set = setOf(), +internal data class SimpleJvmPluginDescription +@JvmOverloads constructor( + override val name: String, + override val version: SemVersion, + override val id: String = name, + override val author: String = "", + override val info: String = "", + override val dependencies: Set = setOf(), ) : JvmPluginDescription { - @Deprecated( - """ - 构造器不稳定, 将在 1.0-RC 删除. 请使用 JvmPluginDescriptionBuilder. -""", - replaceWith = ReplaceWith( - "JvmPluginDescription.invoke(name, version) {}", - "net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription.Companion.invoke" - ), - level = DeprecationLevel.ERROR - ) @Suppress("DEPRECATION_ERROR") @JvmOverloads - public constructor( + constructor( name: String, version: String, id: String = name,