mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix resolve
This commit is contained in:
parent
34eb8eb9cb
commit
14fd3015b9
@ -56,7 +56,7 @@ val RESOLVE_CONTEXT_FQ_NAME = FqName("net.mamoe.mirai.console.compiler.common.Re
|
|||||||
enum class ResolveContextKind {
|
enum class ResolveContextKind {
|
||||||
PLUGIN_ID,
|
PLUGIN_ID,
|
||||||
PLUGIN_NAME,
|
PLUGIN_NAME,
|
||||||
PLUGIN_VERSION,
|
SEMANTIC_VERSION,
|
||||||
|
|
||||||
VERSION_REQUIREMENT,
|
VERSION_REQUIREMENT,
|
||||||
|
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
package net.mamoe.mirai.console.gradle
|
package net.mamoe.mirai.console.gradle
|
||||||
|
|
||||||
internal object VersionConstants {
|
internal object VersionConstants {
|
||||||
const val CONSOLE_VERSION = "1.0-RC" // value is written here automatically during build
|
const val CONSOLE_VERSION = "1.0-RC-dev-33" // value is written here automatically during build
|
||||||
const val CORE_VERSION = "1.3.2" // value is written here automatically during build
|
const val CORE_VERSION = "1.3.2" // value is written here automatically during build
|
||||||
}
|
}
|
@ -21,8 +21,8 @@ kotlin.sourceSets.all {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(kotlin("stdlib-jdk8"))
|
compileOnly(kotlin("stdlib-jdk8"))
|
||||||
|
|
||||||
val core = "1.3.0"
|
val core = "1.3.2"
|
||||||
val console = "1.0-RC-dev-28"
|
val console = "1.0-RC-dev-33"
|
||||||
|
|
||||||
compileOnly("net.mamoe:mirai-console:$console")
|
compileOnly("net.mamoe:mirai-console:$console")
|
||||||
compileOnly("net.mamoe:mirai-core:$core")
|
compileOnly("net.mamoe:mirai-core:$core")
|
||||||
|
@ -8,12 +8,12 @@ import net.mamoe.mirai.console.permission.PermissionService
|
|||||||
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
|
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
|
||||||
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
|
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
|
||||||
|
|
||||||
val T = "org.example" // 编译期常量
|
const val T = "org.example" // 编译期常量
|
||||||
|
|
||||||
object MyPluginMain : KotlinPlugin(
|
object MyPluginMain : KotlinPlugin(
|
||||||
JvmPluginDescription(
|
JvmPluginDescription(
|
||||||
T,
|
T,
|
||||||
"0.1.0",
|
"1.0.0-M4",
|
||||||
) {
|
) {
|
||||||
name(".")
|
name(".")
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ class ContextualParametersChecker : DeclarationChecker {
|
|||||||
EnumMap<ResolveContextKind, (declaration: PsiElement, value: String) -> Diagnostic?>(ResolveContextKind::class.java).apply {
|
EnumMap<ResolveContextKind, (declaration: PsiElement, value: String) -> Diagnostic?>(ResolveContextKind::class.java).apply {
|
||||||
put(ResolveContextKind.PLUGIN_NAME, ::checkPluginName)
|
put(ResolveContextKind.PLUGIN_NAME, ::checkPluginName)
|
||||||
put(ResolveContextKind.PLUGIN_ID, ::checkPluginId)
|
put(ResolveContextKind.PLUGIN_ID, ::checkPluginId)
|
||||||
put(ResolveContextKind.PLUGIN_VERSION, ::checkPluginVersion)
|
put(ResolveContextKind.SEMANTIC_VERSION, ::checkPluginVersion)
|
||||||
put(ResolveContextKind.COMMAND_NAME, ::checkCommandName)
|
put(ResolveContextKind.COMMAND_NAME, ::checkCommandName)
|
||||||
put(ResolveContextKind.PERMISSION_NAME, ::checkPermissionName)
|
put(ResolveContextKind.PERMISSION_NAME, ::checkPermissionName)
|
||||||
put(ResolveContextKind.PERMISSION_NAMESPACE, ::checkPermissionNamespace)
|
put(ResolveContextKind.PERMISSION_NAMESPACE, ::checkPermissionNamespace)
|
||||||
|
Loading…
Reference in New Issue
Block a user