Add resolve context for PluginDependency.versionRequirement

This commit is contained in:
Him188 2020-11-24 10:17:35 +08:00
parent b2ad961e8d
commit e60bba3e08

View File

@ -16,6 +16,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.serializer import kotlinx.serialization.builtins.serializer
import net.mamoe.mirai.console.compiler.common.ResolveContext 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.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.internal.data.map
import net.mamoe.mirai.console.util.SemVersion import net.mamoe.mirai.console.util.SemVersion
@ -37,7 +38,7 @@ public data class PluginDependency @JvmOverloads constructor(
* *
* @see SemVersion.Requirement * @see SemVersion.Requirement
*/ */
public val versionRequirement: String? = null, @ResolveContext(VERSION_REQUIREMENT) public val versionRequirement: String? = null,
/** /**
* 若为 `false`, 插件在找不到此依赖时也能正常加载. * 若为 `false`, 插件在找不到此依赖时也能正常加载.
*/ */