mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +08:00
Add ResolveContext
This commit is contained in:
parent
57c30e4689
commit
704674698f
@ -124,11 +124,12 @@ internal constructor(
|
|||||||
*/
|
*/
|
||||||
@Throws(IllegalArgumentException::class)
|
@Throws(IllegalArgumentException::class)
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun parseRangeRequirement(requirement: String): Requirement = SemVersionInternal.parseRangeRequirement(requirement)
|
public fun parseRangeRequirement(requirement: String): Requirement =
|
||||||
|
SemVersionInternal.parseRangeRequirement(requirement)
|
||||||
|
|
||||||
/** @see [Requirement.test] */
|
/** @see [Requirement.test] */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun Requirement.test(version: String): Boolean = test(invoke(version))
|
public fun Requirement.test(@ResolveContext(PLUGIN_VERSION) version: String): Boolean = test(invoke(version))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当满足 [requirement] 时返回 true, 否则返回 false
|
* 当满足 [requirement] 时返回 true, 否则返回 false
|
||||||
@ -144,7 +145,7 @@ internal constructor(
|
|||||||
/** for Kotlin only */
|
/** for Kotlin only */
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@JvmSynthetic
|
@JvmSynthetic
|
||||||
public operator fun Requirement.contains(version: String): Boolean = test(version)
|
public operator fun Requirement.contains(@ResolveContext(PLUGIN_VERSION) version: String): Boolean = test(version)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
|
Loading…
Reference in New Issue
Block a user