diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 8e2c49a4a..dc692601d 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -20,8 +20,8 @@ object Versions { const val kotlinCompiler = "1.5.10" const val kotlinStdlib = "1.5.10" - const val kotlinIntellijPlugin = "211-1.4.32-release-IJ6693.72" // keep to newest as kotlinCompiler - const val intellij = "2021.1" // don't update easily unless you want your disk space -= 500MB + const val kotlinIntellijPlugin = "211-1.5.20-release-284-IJ7442.40" // keep to newest as kotlinCompiler + const val intellij = "2021.1.1" // don't update easily unless you want your disk space -= 500MB const val coroutines = "1.5.0" @@ -38,7 +38,7 @@ object Versions { @Suppress("SpellCheckingInspection") const val yamlkt = "0.9.0" - const val intellijGradlePlugin = "0.7.2" + const val intellijGradlePlugin = "1.1" } const val `kotlin-compiler` = "org.jetbrains.kotlin:kotlin-compiler:${Versions.kotlinCompiler}" diff --git a/tools/intellij-plugin/build.gradle.kts b/tools/intellij-plugin/build.gradle.kts index 9bc0bc9d3..172345071 100644 --- a/tools/intellij-plugin/build.gradle.kts +++ b/tools/intellij-plugin/build.gradle.kts @@ -104,12 +104,12 @@ dependencies { api(project(":mirai-console-compiler-common")) compileOnly(`kotlin-stdlib-jdk8`) - compileOnly("com.jetbrains:ideaIC:${Versions.intellij}") +// compileOnly("com.jetbrains:ideaIC:${Versions.intellij}") // compileOnly(`kotlin-compiler`) - compileOnly(files("libs/ide-common.jar")) - compileOnly(fileTree("build/idea-sandbox/plugins/Kotlin/lib").filter { - !it.name.contains("stdlib") +// compileOnly(files("libs/ide-common.jar")) + compileOnly(fileTree("run/idea-sandbox/plugins/Kotlin/lib").filter { + !it.name.contains("stdlib") && !it.name.contains("coroutines") }) compileOnly(`kotlin-reflect`) } diff --git a/tools/intellij-plugin/src/IDEContainerContributor.kt b/tools/intellij-plugin/src/IDEContainerContributor.kt index d5cc0640a..21ced0078 100644 --- a/tools/intellij-plugin/src/IDEContainerContributor.kt +++ b/tools/intellij-plugin/src/IDEContainerContributor.kt @@ -9,6 +9,7 @@ package net.mamoe.mirai.console.intellij +import net.mamoe.mirai.console.compiler.common.castOrNull import net.mamoe.mirai.console.intellij.diagnostics.CommandDeclarationChecker import net.mamoe.mirai.console.intellij.diagnostics.ContextualParametersChecker import net.mamoe.mirai.console.intellij.diagnostics.PluginDataValuesChecker