diff --git a/settings.gradle.kts b/settings.gradle.kts index e1b5cfd3a..aaf891a63 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -20,8 +20,8 @@ fun includeProject(projectPath: String, path: String? = null) { includeProject(":mirai-console", "backend/mirai-console") includeProject(":mirai-console.codegen", "backend/codegen") includeProject(":mirai-console-pure", "frontend/mirai-console-pure") -includeProject(":mirai-console-intellij", "intellij-plugin") -includeProject(":mirai-console-gradle", "gradle-plugin") +includeProject(":mirai-console-intellij", "tools/intellij-plugin") +includeProject(":mirai-console-gradle", "tools/gradle-plugin") @Suppress("ConstantConditionIf") if (!disableOldFrontEnds) { diff --git a/gradle-plugin/build.gradle.kts b/tools/gradle-plugin/build.gradle.kts similarity index 100% rename from gradle-plugin/build.gradle.kts rename to tools/gradle-plugin/build.gradle.kts diff --git a/intellij-plugin/build.gradle.kts b/tools/intellij-plugin/build.gradle.kts similarity index 100% rename from intellij-plugin/build.gradle.kts rename to tools/intellij-plugin/build.gradle.kts diff --git a/intellij-plugin/libs/ide-common.jar b/tools/intellij-plugin/libs/ide-common.jar similarity index 100% rename from intellij-plugin/libs/ide-common.jar rename to tools/intellij-plugin/libs/ide-common.jar diff --git a/intellij-plugin/run/projects/.gitignore b/tools/intellij-plugin/run/projects/.gitignore similarity index 100% rename from intellij-plugin/run/projects/.gitignore rename to tools/intellij-plugin/run/projects/.gitignore diff --git a/intellij-plugin/run/projects/test-project/build.gradle.kts b/tools/intellij-plugin/run/projects/test-project/build.gradle.kts similarity index 100% rename from intellij-plugin/run/projects/test-project/build.gradle.kts rename to tools/intellij-plugin/run/projects/test-project/build.gradle.kts diff --git a/intellij-plugin/run/projects/test-project/gradle.properties b/tools/intellij-plugin/run/projects/test-project/gradle.properties similarity index 100% rename from intellij-plugin/run/projects/test-project/gradle.properties rename to tools/intellij-plugin/run/projects/test-project/gradle.properties diff --git a/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar b/tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar rename to tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.jar diff --git a/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.properties b/tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.properties rename to tools/intellij-plugin/run/projects/test-project/gradle/wrapper/gradle-wrapper.properties diff --git a/intellij-plugin/run/projects/test-project/gradlew b/tools/intellij-plugin/run/projects/test-project/gradlew similarity index 100% rename from intellij-plugin/run/projects/test-project/gradlew rename to tools/intellij-plugin/run/projects/test-project/gradlew diff --git a/intellij-plugin/run/projects/test-project/gradlew.bat b/tools/intellij-plugin/run/projects/test-project/gradlew.bat similarity index 100% rename from intellij-plugin/run/projects/test-project/gradlew.bat rename to tools/intellij-plugin/run/projects/test-project/gradlew.bat diff --git a/intellij-plugin/run/projects/test-project/settings.gradle.kts b/tools/intellij-plugin/run/projects/test-project/settings.gradle.kts similarity index 100% rename from intellij-plugin/run/projects/test-project/settings.gradle.kts rename to tools/intellij-plugin/run/projects/test-project/settings.gradle.kts diff --git a/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MyPluginMain.kt b/tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MyPluginMain.kt similarity index 100% rename from intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MyPluginMain.kt rename to tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MyPluginMain.kt diff --git a/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MySimpleCommand.kt b/tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MySimpleCommand.kt similarity index 100% rename from intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MySimpleCommand.kt rename to tools/intellij-plugin/run/projects/test-project/src/main/kotlin/org/example/myplugin/MySimpleCommand.kt diff --git a/intellij-plugin/run/projects/test-project/src/test/kotlin/RunConsole.kt b/tools/intellij-plugin/run/projects/test-project/src/test/kotlin/RunConsole.kt similarity index 100% rename from intellij-plugin/run/projects/test-project/src/test/kotlin/RunConsole.kt rename to tools/intellij-plugin/run/projects/test-project/src/test/kotlin/RunConsole.kt diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt similarity index 87% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt index ef7231786..7e023b444 100644 --- a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt +++ b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt @@ -9,6 +9,7 @@ package net.mamoe.mirai.console.intellij +import net.mamoe.mirai.console.intellij.diagnostics.PluginDescriptionChecker import org.jetbrains.kotlin.container.StorageComponentContainer import org.jetbrains.kotlin.container.useInstance import org.jetbrains.kotlin.descriptors.ModuleDescriptor @@ -20,6 +21,6 @@ class IDEContainerContributor : StorageComponentContainerContributor { platform: org.jetbrains.kotlin.platform.TargetPlatform, moduleDescriptor: ModuleDescriptor, ) { - container.useInstance(MiraiConsoleDeclarationChecker()) + container.useInstance(PluginDescriptionChecker()) } } \ No newline at end of file diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt similarity index 100% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/MiraiConsoleDeclarationChecker.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDescriptionChecker.kt similarity index 87% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/MiraiConsoleDeclarationChecker.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDescriptionChecker.kt index f2d99b213..83a52f8ca 100644 --- a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/MiraiConsoleDeclarationChecker.kt +++ b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDescriptionChecker.kt @@ -7,19 +7,18 @@ * https://github.com/mamoe/mirai/blob/master/LICENSE */ -package net.mamoe.mirai.console.intellij +package net.mamoe.mirai.console.intellij.diagnostics import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.psi.KtDeclaration import org.jetbrains.kotlin.resolve.checkers.DeclarationChecker import org.jetbrains.kotlin.resolve.checkers.DeclarationCheckerContext -class MiraiConsoleDeclarationChecker : DeclarationChecker { +class PluginDescriptionChecker : DeclarationChecker { override fun check( declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext, ) { - } } \ No newline at end of file diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt similarity index 100% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt similarity index 100% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/util.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/util.kt similarity index 100% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/util.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/util.kt diff --git a/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/psiResolve.kt b/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/psiResolve.kt similarity index 100% rename from intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/psiResolve.kt rename to tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/psiResolve.kt diff --git a/intellij-plugin/src/main/resources/META-INF/plugin.xml b/tools/intellij-plugin/src/main/resources/META-INF/plugin.xml similarity index 100% rename from intellij-plugin/src/main/resources/META-INF/plugin.xml rename to tools/intellij-plugin/src/main/resources/META-INF/plugin.xml diff --git a/intellij-plugin/src/main/resources/icons/commandDeclaration.svg b/tools/intellij-plugin/src/main/resources/icons/commandDeclaration.svg similarity index 100% rename from intellij-plugin/src/main/resources/icons/commandDeclaration.svg rename to tools/intellij-plugin/src/main/resources/icons/commandDeclaration.svg diff --git a/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png b/tools/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png similarity index 100% rename from intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png rename to tools/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png