From e60bba3e081bd505e06c2b5b65ebb5f6bbcd93fa Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 24 Nov 2020 10:17:35 +0800 Subject: [PATCH] Add resolve context for PluginDependency.versionRequirement --- .../mirai-console/src/plugin/description/PluginDependency.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/mirai-console/src/plugin/description/PluginDependency.kt b/backend/mirai-console/src/plugin/description/PluginDependency.kt index 348b274fa..a575e8bb4 100644 --- a/backend/mirai-console/src/plugin/description/PluginDependency.kt +++ b/backend/mirai-console/src/plugin/description/PluginDependency.kt @@ -16,6 +16,7 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.builtins.serializer import net.mamoe.mirai.console.compiler.common.ResolveContext import net.mamoe.mirai.console.compiler.common.ResolveContext.Kind.PLUGIN_ID +import net.mamoe.mirai.console.compiler.common.ResolveContext.Kind.VERSION_REQUIREMENT import net.mamoe.mirai.console.internal.data.map import net.mamoe.mirai.console.util.SemVersion @@ -37,7 +38,7 @@ public data class PluginDependency @JvmOverloads constructor( * * @see SemVersion.Requirement */ - public val versionRequirement: String? = null, + @ResolveContext(VERSION_REQUIREMENT) public val versionRequirement: String? = null, /** * 若为 `false`, 插件在找不到此依赖时也能正常加载. */