diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/Codegen.kt b/backend/codegen/src/Codegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/Codegen.kt rename to backend/codegen/src/Codegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/MessageScopeCodegen.kt b/backend/codegen/src/MessageScopeCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/MessageScopeCodegen.kt rename to backend/codegen/src/MessageScopeCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuePluginDataCodegen.kt b/backend/codegen/src/ValuePluginDataCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuePluginDataCodegen.kt rename to backend/codegen/src/ValuePluginDataCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/JSettingCodegen.kt b/backend/codegen/src/old/JSettingCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/JSettingCodegen.kt rename to backend/codegen/src/old/JSettingCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/SettingValueUseSiteCodegen.kt b/backend/codegen/src/old/SettingValueUseSiteCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/SettingValueUseSiteCodegen.kt rename to backend/codegen/src/old/SettingValueUseSiteCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/ValueImplCodegen.kt b/backend/codegen/src/old/ValueImplCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/ValueImplCodegen.kt rename to backend/codegen/src/old/ValueImplCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/ValuesCodegen.kt b/backend/codegen/src/old/ValuesCodegen.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/old/ValuesCodegen.kt rename to backend/codegen/src/old/ValuesCodegen.kt diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/util.kt b/backend/codegen/src/util.kt similarity index 100% rename from backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/util.kt rename to backend/codegen/src/util.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt b/backend/mirai-console/src/MiraiConsole.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt rename to backend/mirai-console/src/MiraiConsole.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleFrontEndDescription.kt b/backend/mirai-console/src/MiraiConsoleFrontEndDescription.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleFrontEndDescription.kt rename to backend/mirai-console/src/MiraiConsoleFrontEndDescription.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt b/backend/mirai-console/src/MiraiConsoleImplementation.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt rename to backend/mirai-console/src/MiraiConsoleImplementation.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/AbstractCommand.kt b/backend/mirai-console/src/command/AbstractCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/AbstractCommand.kt rename to backend/mirai-console/src/command/AbstractCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt b/backend/mirai-console/src/command/BuiltInCommands.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/BuiltInCommands.kt rename to backend/mirai-console/src/command/BuiltInCommands.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt b/backend/mirai-console/src/command/Command.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt rename to backend/mirai-console/src/command/Command.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandExecuteResult.kt b/backend/mirai-console/src/command/CommandExecuteResult.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandExecuteResult.kt rename to backend/mirai-console/src/command/CommandExecuteResult.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandExecutionException.kt b/backend/mirai-console/src/command/CommandExecutionException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandExecutionException.kt rename to backend/mirai-console/src/command/CommandExecutionException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt b/backend/mirai-console/src/command/CommandManager.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt rename to backend/mirai-console/src/command/CommandManager.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt b/backend/mirai-console/src/command/CommandOwner.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt rename to backend/mirai-console/src/command/CommandOwner.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandPermissionDeniedException.kt b/backend/mirai-console/src/command/CommandPermissionDeniedException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandPermissionDeniedException.kt rename to backend/mirai-console/src/command/CommandPermissionDeniedException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandSender.kt b/backend/mirai-console/src/command/CommandSender.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandSender.kt rename to backend/mirai-console/src/command/CommandSender.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CompositeCommand.kt b/backend/mirai-console/src/command/CompositeCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CompositeCommand.kt rename to backend/mirai-console/src/command/CompositeCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/IllegalCommandArgumentException.kt b/backend/mirai-console/src/command/IllegalCommandArgumentException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/IllegalCommandArgumentException.kt rename to backend/mirai-console/src/command/IllegalCommandArgumentException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt b/backend/mirai-console/src/command/RawCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt rename to backend/mirai-console/src/command/RawCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/SimpleCommand.kt b/backend/mirai-console/src/command/SimpleCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/SimpleCommand.kt rename to backend/mirai-console/src/command/SimpleCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentContext.kt b/backend/mirai-console/src/command/descriptor/CommandArgumentContext.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentContext.kt rename to backend/mirai-console/src/command/descriptor/CommandArgumentContext.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentParserBuiltins.kt b/backend/mirai-console/src/command/descriptor/CommandArgumentParserBuiltins.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentParserBuiltins.kt rename to backend/mirai-console/src/command/descriptor/CommandArgumentParserBuiltins.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandParameter.kt b/backend/mirai-console/src/command/descriptor/CommandParameter.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandParameter.kt rename to backend/mirai-console/src/command/descriptor/CommandParameter.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandSignature.kt b/backend/mirai-console/src/command/descriptor/CommandSignature.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandSignature.kt rename to backend/mirai-console/src/command/descriptor/CommandSignature.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandValueArgumentParser.kt b/backend/mirai-console/src/command/descriptor/CommandValueArgumentParser.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandValueArgumentParser.kt rename to backend/mirai-console/src/command/descriptor/CommandValueArgumentParser.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/Exceptions.kt b/backend/mirai-console/src/command/descriptor/Exceptions.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/Exceptions.kt rename to backend/mirai-console/src/command/descriptor/Exceptions.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/ExperimentalCommandDescriptors.kt b/backend/mirai-console/src/command/descriptor/ExperimentalCommandDescriptors.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/ExperimentalCommandDescriptors.kt rename to backend/mirai-console/src/command/descriptor/ExperimentalCommandDescriptors.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/TypeVariant.kt b/backend/mirai-console/src/command/descriptor/TypeVariant.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/TypeVariant.kt rename to backend/mirai-console/src/command/descriptor/TypeVariant.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JCompositeCommand.kt b/backend/mirai-console/src/command/java/JCompositeCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JCompositeCommand.kt rename to backend/mirai-console/src/command/java/JCompositeCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JRawCommand.kt b/backend/mirai-console/src/command/java/JRawCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JRawCommand.kt rename to backend/mirai-console/src/command/java/JRawCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JSimpleCommand.kt b/backend/mirai-console/src/command/java/JSimpleCommand.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/java/JSimpleCommand.kt rename to backend/mirai-console/src/command/java/JSimpleCommand.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandCall.kt b/backend/mirai-console/src/command/parse/CommandCall.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandCall.kt rename to backend/mirai-console/src/command/parse/CommandCall.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandCallParser.kt b/backend/mirai-console/src/command/parse/CommandCallParser.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandCallParser.kt rename to backend/mirai-console/src/command/parse/CommandCallParser.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandValueArgument.kt b/backend/mirai-console/src/command/parse/CommandValueArgument.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/CommandValueArgument.kt rename to backend/mirai-console/src/command/parse/CommandValueArgument.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/SpaceSeparatedCommandCallParser.kt b/backend/mirai-console/src/command/parse/SpaceSeparatedCommandCallParser.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/parse/SpaceSeparatedCommandCallParser.kt rename to backend/mirai-console/src/command/parse/SpaceSeparatedCommandCallParser.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/BuiltInCommandCallResolver.kt b/backend/mirai-console/src/command/resolve/BuiltInCommandCallResolver.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/BuiltInCommandCallResolver.kt rename to backend/mirai-console/src/command/resolve/BuiltInCommandCallResolver.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/CommandCallResolver.kt b/backend/mirai-console/src/command/resolve/CommandCallResolver.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/CommandCallResolver.kt rename to backend/mirai-console/src/command/resolve/CommandCallResolver.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/ResolvedCommandCall.kt b/backend/mirai-console/src/command/resolve/ResolvedCommandCall.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/resolve/ResolvedCommandCall.kt rename to backend/mirai-console/src/command/resolve/ResolvedCommandCall.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/compiler/common/ResolveContext.kt b/backend/mirai-console/src/common/ResolveContext.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/compiler/common/ResolveContext.kt rename to backend/mirai-console/src/common/ResolveContext.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/compiler/common/RestrictedScope.kt b/backend/mirai-console/src/common/RestrictedScope.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/compiler/common/RestrictedScope.kt rename to backend/mirai-console/src/common/RestrictedScope.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AbstractPluginData.kt b/backend/mirai-console/src/data/AbstractPluginData.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AbstractPluginData.kt rename to backend/mirai-console/src/data/AbstractPluginData.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginConfig.kt b/backend/mirai-console/src/data/AutoSavePluginConfig.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginConfig.kt rename to backend/mirai-console/src/data/AutoSavePluginConfig.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginData.kt b/backend/mirai-console/src/data/AutoSavePluginData.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginData.kt rename to backend/mirai-console/src/data/AutoSavePluginData.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginDataHolder.kt b/backend/mirai-console/src/data/AutoSavePluginDataHolder.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginDataHolder.kt rename to backend/mirai-console/src/data/AutoSavePluginDataHolder.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginConfig.kt b/backend/mirai-console/src/data/PluginConfig.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginConfig.kt rename to backend/mirai-console/src/data/PluginConfig.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginData.kt b/backend/mirai-console/src/data/PluginData.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginData.kt rename to backend/mirai-console/src/data/PluginData.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataExtensions.kt b/backend/mirai-console/src/data/PluginDataExtensions.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataExtensions.kt rename to backend/mirai-console/src/data/PluginDataExtensions.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt b/backend/mirai-console/src/data/PluginDataHolder.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt rename to backend/mirai-console/src/data/PluginDataHolder.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt b/backend/mirai-console/src/data/PluginDataStorage.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt rename to backend/mirai-console/src/data/PluginDataStorage.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/Value.kt b/backend/mirai-console/src/data/Value.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/Value.kt rename to backend/mirai-console/src/data/Value.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/ValueDescription.kt b/backend/mirai-console/src/data/ValueDescription.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/ValueDescription.kt rename to backend/mirai-console/src/data/ValueDescription.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/ValueName.kt b/backend/mirai-console/src/data/ValueName.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/ValueName.kt rename to backend/mirai-console/src/data/ValueName.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/java/JAutoSavePluginConfig.kt b/backend/mirai-console/src/data/java/JAutoSavePluginConfig.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/java/JAutoSavePluginConfig.kt rename to backend/mirai-console/src/data/java/JAutoSavePluginConfig.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/java/JAutoSavePluginData.kt b/backend/mirai-console/src/data/java/JAutoSavePluginData.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/java/JAutoSavePluginData.kt rename to backend/mirai-console/src/data/java/JAutoSavePluginData.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/events/CommandExecutionEvent.kt b/backend/mirai-console/src/events/CommandExecutionEvent.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/events/CommandExecutionEvent.kt rename to backend/mirai-console/src/events/CommandExecutionEvent.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/events/ConsoleEvent.kt b/backend/mirai-console/src/events/ConsoleEvent.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/events/ConsoleEvent.kt rename to backend/mirai-console/src/events/ConsoleEvent.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ComponentStorage.kt b/backend/mirai-console/src/extension/ComponentStorage.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ComponentStorage.kt rename to backend/mirai-console/src/extension/ComponentStorage.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/Extension.kt b/backend/mirai-console/src/extension/Extension.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/Extension.kt rename to backend/mirai-console/src/extension/Extension.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ExtensionException.kt b/backend/mirai-console/src/extension/ExtensionException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ExtensionException.kt rename to backend/mirai-console/src/extension/ExtensionException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ExtensionPoint.kt b/backend/mirai-console/src/extension/ExtensionPoint.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ExtensionPoint.kt rename to backend/mirai-console/src/extension/ExtensionPoint.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/PluginComponentStorage.kt b/backend/mirai-console/src/extension/PluginComponentStorage.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/PluginComponentStorage.kt rename to backend/mirai-console/src/extension/PluginComponentStorage.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/BotConfigurationAlterer.kt b/backend/mirai-console/src/extensions/BotConfigurationAlterer.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/BotConfigurationAlterer.kt rename to backend/mirai-console/src/extensions/BotConfigurationAlterer.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/CommandCallParserProvider.kt b/backend/mirai-console/src/extensions/CommandCallParserProvider.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/CommandCallParserProvider.kt rename to backend/mirai-console/src/extensions/CommandCallParserProvider.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/CommandCallResolverProvider.kt b/backend/mirai-console/src/extensions/CommandCallResolverProvider.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/CommandCallResolverProvider.kt rename to backend/mirai-console/src/extensions/CommandCallResolverProvider.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PermissionServiceProvider.kt b/backend/mirai-console/src/extensions/PermissionServiceProvider.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PermissionServiceProvider.kt rename to backend/mirai-console/src/extensions/PermissionServiceProvider.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PluginLoaderProvider.kt b/backend/mirai-console/src/extensions/PluginLoaderProvider.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PluginLoaderProvider.kt rename to backend/mirai-console/src/extensions/PluginLoaderProvider.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PostStartupExtension.kt b/backend/mirai-console/src/extensions/PostStartupExtension.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/PostStartupExtension.kt rename to backend/mirai-console/src/extensions/PostStartupExtension.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/SingletonExtensionSelector.kt b/backend/mirai-console/src/extensions/SingletonExtensionSelector.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/SingletonExtensionSelector.kt rename to backend/mirai-console/src/extensions/SingletonExtensionSelector.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleBuildConstants.kt b/backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleBuildConstants.kt rename to backend/mirai-console/src/internal/MiraiConsoleBuildConstants.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleImplementationBridge.kt b/backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/MiraiConsoleImplementationBridge.kt rename to backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CommandManagerImpl.kt b/backend/mirai-console/src/internal/command/CommandManagerImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CommandManagerImpl.kt rename to backend/mirai-console/src/internal/command/CommandManagerImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CommandReflector.kt b/backend/mirai-console/src/internal/command/CommandReflector.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/CommandReflector.kt rename to backend/mirai-console/src/internal/command/CommandReflector.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/internal.kt b/backend/mirai-console/src/internal/command/internal.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/command/internal.kt rename to backend/mirai-console/src/internal/command/internal.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/CompositeValueImpl.kt b/backend/mirai-console/src/internal/data/CompositeValueImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/CompositeValueImpl.kt rename to backend/mirai-console/src/internal/data/CompositeValueImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MemoryPluginDataStorageImpl.kt b/backend/mirai-console/src/internal/data/MemoryPluginDataStorageImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MemoryPluginDataStorageImpl.kt rename to backend/mirai-console/src/internal/data/MemoryPluginDataStorageImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt b/backend/mirai-console/src/internal/data/MultiFilePluginDataStorageImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/MultiFilePluginDataStorageImpl.kt rename to backend/mirai-console/src/internal/data/MultiFilePluginDataStorageImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/PluginDataImpl.kt b/backend/mirai-console/src/internal/data/PluginDataImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/PluginDataImpl.kt rename to backend/mirai-console/src/internal/data/PluginDataImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/_PluginData.value.kt b/backend/mirai-console/src/internal/data/_PluginData.value.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/_PluginData.value.kt rename to backend/mirai-console/src/internal/data/_PluginData.value.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/_PrimitiveValueDeclarations.kt b/backend/mirai-console/src/internal/data/_PrimitiveValueDeclarations.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/_PrimitiveValueDeclarations.kt rename to backend/mirai-console/src/internal/data/_PrimitiveValueDeclarations.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/builtins/AutoLoginConfig.kt b/backend/mirai-console/src/internal/data/builtins/AutoLoginConfig.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/builtins/AutoLoginConfig.kt rename to backend/mirai-console/src/internal/data/builtins/AutoLoginConfig.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/builtins/ConsoleDataScope.kt b/backend/mirai-console/src/internal/data/builtins/ConsoleDataScope.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/builtins/ConsoleDataScope.kt rename to backend/mirai-console/src/internal/data/builtins/ConsoleDataScope.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/collectionUtil.kt b/backend/mirai-console/src/internal/data/collectionUtil.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/collectionUtil.kt rename to backend/mirai-console/src/internal/data/collectionUtil.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/reflectionUtils.kt b/backend/mirai-console/src/internal/data/reflectionUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/reflectionUtils.kt rename to backend/mirai-console/src/internal/data/reflectionUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/serializerHelper.kt b/backend/mirai-console/src/internal/data/serializerHelper.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/serializerHelper.kt rename to backend/mirai-console/src/internal/data/serializerHelper.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/valueFromKTypeImpl.kt b/backend/mirai-console/src/internal/data/valueFromKTypeImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/data/valueFromKTypeImpl.kt rename to backend/mirai-console/src/internal/data/valueFromKTypeImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/extension/BuiltInSingletonExtensionSelector.kt b/backend/mirai-console/src/internal/extension/BuiltInSingletonExtensionSelector.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/extension/BuiltInSingletonExtensionSelector.kt rename to backend/mirai-console/src/internal/extension/BuiltInSingletonExtensionSelector.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/extension/ComponentStorageInternal.kt b/backend/mirai-console/src/internal/extension/ComponentStorageInternal.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/extension/ComponentStorageInternal.kt rename to backend/mirai-console/src/internal/extension/ComponentStorageInternal.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/AbstractConcurrentPermissionService.kt b/backend/mirai-console/src/internal/permission/AbstractConcurrentPermissionService.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/AbstractConcurrentPermissionService.kt rename to backend/mirai-console/src/internal/permission/AbstractConcurrentPermissionService.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/BuiltInPermissionServices.kt b/backend/mirai-console/src/internal/permission/BuiltInPermissionServices.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/BuiltInPermissionServices.kt rename to backend/mirai-console/src/internal/permission/BuiltInPermissionServices.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/parseFromStringImpl.kt b/backend/mirai-console/src/internal/permission/parseFromStringImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/permission/parseFromStringImpl.kt rename to backend/mirai-console/src/internal/permission/parseFromStringImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt b/backend/mirai-console/src/internal/plugin/BuiltInJvmPluginLoaderImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt rename to backend/mirai-console/src/internal/plugin/BuiltInJvmPluginLoaderImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/Exceptions.kt b/backend/mirai-console/src/internal/plugin/Exceptions.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/Exceptions.kt rename to backend/mirai-console/src/internal/plugin/Exceptions.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/ExportManagerImpl.kt b/backend/mirai-console/src/internal/plugin/ExportManagerImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/ExportManagerImpl.kt rename to backend/mirai-console/src/internal/plugin/ExportManagerImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt b/backend/mirai-console/src/internal/plugin/JvmPluginClassLoader.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoader.kt rename to backend/mirai-console/src/internal/plugin/JvmPluginClassLoader.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt b/backend/mirai-console/src/internal/plugin/JvmPluginInternal.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt rename to backend/mirai-console/src/internal/plugin/JvmPluginInternal.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt b/backend/mirai-console/src/internal/plugin/PluginManagerImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt rename to backend/mirai-console/src/internal/plugin/PluginManagerImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/ByteUtils.kt b/backend/mirai-console/src/internal/util/ByteUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/ByteUtils.kt rename to backend/mirai-console/src/internal/util/ByteUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/CommonUtils.kt b/backend/mirai-console/src/internal/util/CommonUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/CommonUtils.kt rename to backend/mirai-console/src/internal/util/CommonUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/ConsoleInputImpl.kt b/backend/mirai-console/src/internal/util/ConsoleInputImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/ConsoleInputImpl.kt rename to backend/mirai-console/src/internal/util/ConsoleInputImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/JavaPluginSchedulerImpl.kt b/backend/mirai-console/src/internal/util/JavaPluginSchedulerImpl.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/JavaPluginSchedulerImpl.kt rename to backend/mirai-console/src/internal/util/JavaPluginSchedulerImpl.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt b/backend/mirai-console/src/internal/util/PluginServiceHelper.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt rename to backend/mirai-console/src/internal/util/PluginServiceHelper.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/semver/RangeTokenReader.kt b/backend/mirai-console/src/internal/util/semver/RangeTokenReader.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/semver/RangeTokenReader.kt rename to backend/mirai-console/src/internal/util/semver/RangeTokenReader.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/semver/SemVersionInternal.kt b/backend/mirai-console/src/internal/util/semver/SemVersionInternal.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/semver/SemVersionInternal.kt rename to backend/mirai-console/src/internal/util/semver/SemVersionInternal.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt b/backend/mirai-console/src/permission/Permission.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt rename to backend/mirai-console/src/permission/Permission.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionId.kt b/backend/mirai-console/src/permission/PermissionId.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionId.kt rename to backend/mirai-console/src/permission/PermissionId.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionIdNamespace.kt b/backend/mirai-console/src/permission/PermissionIdNamespace.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionIdNamespace.kt rename to backend/mirai-console/src/permission/PermissionIdNamespace.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionImplementation.kt b/backend/mirai-console/src/permission/PermissionImplementation.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionImplementation.kt rename to backend/mirai-console/src/permission/PermissionImplementation.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionRegistryConflictException.kt b/backend/mirai-console/src/permission/PermissionRegistryConflictException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionRegistryConflictException.kt rename to backend/mirai-console/src/permission/PermissionRegistryConflictException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt b/backend/mirai-console/src/permission/PermissionService.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt rename to backend/mirai-console/src/permission/PermissionService.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permittee.kt b/backend/mirai-console/src/permission/Permittee.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permittee.kt rename to backend/mirai-console/src/permission/Permittee.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermitteeId.kt b/backend/mirai-console/src/permission/PermitteeId.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermitteeId.kt rename to backend/mirai-console/src/permission/PermitteeId.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/Plugin.kt b/backend/mirai-console/src/plugin/Plugin.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/Plugin.kt rename to backend/mirai-console/src/plugin/Plugin.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginFileExtensions.kt b/backend/mirai-console/src/plugin/PluginFileExtensions.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginFileExtensions.kt rename to backend/mirai-console/src/plugin/PluginFileExtensions.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginManager.kt b/backend/mirai-console/src/plugin/PluginManager.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginManager.kt rename to backend/mirai-console/src/plugin/PluginManager.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/ResourceContainer.kt b/backend/mirai-console/src/plugin/ResourceContainer.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/ResourceContainer.kt rename to backend/mirai-console/src/plugin/ResourceContainer.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/center/PluginCenter.kt b/backend/mirai-console/src/plugin/center/PluginCenter.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/center/PluginCenter.kt rename to backend/mirai-console/src/plugin/center/PluginCenter.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/IllegalPluginDescriptionException.kt b/backend/mirai-console/src/plugin/description/IllegalPluginDescriptionException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/IllegalPluginDescriptionException.kt rename to backend/mirai-console/src/plugin/description/IllegalPluginDescriptionException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt b/backend/mirai-console/src/plugin/description/PluginDependency.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDependency.kt rename to backend/mirai-console/src/plugin/description/PluginDependency.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDescription.kt b/backend/mirai-console/src/plugin/description/PluginDescription.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDescription.kt rename to backend/mirai-console/src/plugin/description/PluginDescription.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt b/backend/mirai-console/src/plugin/jvm/AbstractJvmPlugin.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt rename to backend/mirai-console/src/plugin/jvm/AbstractJvmPlugin.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/ExportManager.kt b/backend/mirai-console/src/plugin/jvm/ExportManager.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/ExportManager.kt rename to backend/mirai-console/src/plugin/jvm/ExportManager.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPlugin.kt b/backend/mirai-console/src/plugin/jvm/JavaPlugin.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPlugin.kt rename to backend/mirai-console/src/plugin/jvm/JavaPlugin.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPluginScheduler.kt b/backend/mirai-console/src/plugin/jvm/JavaPluginScheduler.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPluginScheduler.kt rename to backend/mirai-console/src/plugin/jvm/JavaPluginScheduler.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt b/backend/mirai-console/src/plugin/jvm/JvmPlugin.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt rename to backend/mirai-console/src/plugin/jvm/JvmPlugin.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt b/backend/mirai-console/src/plugin/jvm/JvmPluginDescription.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt rename to backend/mirai-console/src/plugin/jvm/JvmPluginDescription.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt b/backend/mirai-console/src/plugin/jvm/JvmPluginLoader.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt rename to backend/mirai-console/src/plugin/jvm/JvmPluginLoader.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt b/backend/mirai-console/src/plugin/jvm/KotlinPlugin.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt rename to backend/mirai-console/src/plugin/jvm/KotlinPlugin.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/FilePluginLoader.kt b/backend/mirai-console/src/plugin/loader/FilePluginLoader.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/FilePluginLoader.kt rename to backend/mirai-console/src/plugin/loader/FilePluginLoader.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoadException.kt b/backend/mirai-console/src/plugin/loader/PluginLoadException.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoadException.kt rename to backend/mirai-console/src/plugin/loader/PluginLoadException.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoader.kt b/backend/mirai-console/src/plugin/loader/PluginLoader.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoader.kt rename to backend/mirai-console/src/plugin/loader/PluginLoader.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/Annotations.kt b/backend/mirai-console/src/util/Annotations.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/Annotations.kt rename to backend/mirai-console/src/util/Annotations.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ConsoleInput.kt b/backend/mirai-console/src/util/ConsoleInput.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ConsoleInput.kt rename to backend/mirai-console/src/util/ConsoleInput.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ContactUtils.kt b/backend/mirai-console/src/util/ContactUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ContactUtils.kt rename to backend/mirai-console/src/util/ContactUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/CoroutineScopeUtils.kt b/backend/mirai-console/src/util/CoroutineScopeUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/CoroutineScopeUtils.kt rename to backend/mirai-console/src/util/CoroutineScopeUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt b/backend/mirai-console/src/util/MessageScope.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt rename to backend/mirai-console/src/util/MessageScope.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageUtils.kt b/backend/mirai-console/src/util/MessageUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageUtils.kt rename to backend/mirai-console/src/util/MessageUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/SemVersion.kt b/backend/mirai-console/src/util/SemVersion.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/SemVersion.kt rename to backend/mirai-console/src/util/SemVersion.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/StandardUtils.kt b/backend/mirai-console/src/util/StandardUtils.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/StandardUtils.kt rename to backend/mirai-console/src/util/StandardUtils.kt diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/retryCatching.kt b/backend/mirai-console/src/util/retryCatching.kt similarity index 100% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/retryCatching.kt rename to backend/mirai-console/src/util/retryCatching.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt b/backend/mirai-console/test/TestMiraiConosle.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt rename to backend/mirai-console/test/TestMiraiConosle.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt b/backend/mirai-console/test/command/TestCommand.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/TestCommand.kt rename to backend/mirai-console/test/command/TestCommand.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/commanTestingUtil.kt b/backend/mirai-console/test/command/commanTestingUtil.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/command/commanTestingUtil.kt rename to backend/mirai-console/test/command/commanTestingUtil.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/data/SettingTest.kt b/backend/mirai-console/test/data/SettingTest.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/data/SettingTest.kt rename to backend/mirai-console/test/data/SettingTest.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/permission/PermissionsBasicsTest.kt b/backend/mirai-console/test/permission/PermissionsBasicsTest.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/permission/PermissionsBasicsTest.kt rename to backend/mirai-console/test/permission/PermissionsBasicsTest.kt diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt b/backend/mirai-console/test/util/TestSemVersion.kt similarity index 100% rename from backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt rename to backend/mirai-console/test/util/TestSemVersion.kt diff --git a/build.gradle.kts b/build.gradle.kts index ca24e980d..426e01df6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,9 @@ @file:Suppress("UnstableApiUsage") + +import org.jetbrains.kotlin.gradle.dsl.* +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation +import org.jetbrains.kotlin.utils.addToStdlib.safeAs + plugins { kotlin("jvm") version Versions.kotlinCompiler kotlin("plugin.serialization") version Versions.kotlinCompiler @@ -28,6 +33,129 @@ subprojects { afterEvaluate { apply() - setJavaCompileTarget() + configureJvmTarget() + configureEncoding() + configureKotlinExperimentalUsages() + configureKotlinCompilerSettings() + configureKotlinTestSettings() + configureSourceSets() } -} \ No newline at end of file +} + +val experimentalAnnotations = arrayOf( + "kotlin.RequiresOptIn", + "kotlin.ExperimentalUnsignedTypes", + // "kotlin.ExperimentalStdlibApi", + "kotlin.contracts.ExperimentalContracts", + "kotlin.experimental.ExperimentalTypeInference", + // "kotlinx.coroutines.ExperimentalCoroutinesApi", + "io.ktor.util.KtorExperimentalAPI", + "kotlin.time.ExperimentalTime" +) + + +fun Project.configureJvmTarget() { + tasks.withType(KotlinJvmCompile::class.java) { + kotlinOptions.jvmTarget = "1.8" + } + + extensions.findByType(JavaPluginExtension::class.java)?.run { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } +} + +fun Project.useIr() { + tasks { + withType(KotlinJvmCompile::class.java) { + kotlinOptions.useIR = true + } + } +} + +fun Project.configureKotlinTestSettings() { + tasks.withType(Test::class) { + useJUnitPlatform() + } + when { + isKotlinJvmProject -> { + dependencies { + testImplementation(kotlin("test-junit5")) + + testApi("org.junit.jupiter:junit-jupiter-api:5.2.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.2.0") + } + } + isKotlinMpp -> { + kotlinSourceSets?.forEach { sourceSet -> + if (sourceSet.name == "common") { + sourceSet.dependencies { + implementation(kotlin("test")) + implementation(kotlin("test-annotations-common")) + } + } else { + sourceSet.dependencies { + implementation(kotlin("test-junit5")) + + implementation("org.junit.jupiter:junit-jupiter-api:5.2.0") + implementation("org.junit.jupiter:junit-jupiter-engine:5.2.0") + } + } + } + } + } +} + +fun Project.configureKotlinCompilerSettings() { + val kotlinCompilations = kotlinCompilations ?: return + for (kotlinCompilation in kotlinCompilations) with(kotlinCompilation) { + if (isKotlinJvmProject) { + @Suppress("UNCHECKED_CAST") + this as KotlinCompilation + } + kotlinOptions.freeCompilerArgs += "-Xjvm-default=all" + } +} + +fun Project.configureEncoding() { + tasks.withType(JavaCompile::class.java) { + options.encoding = "UTF8" + } +} + +fun Project.configureSourceSets() { + sourceSets { + findByName("main")?.apply { + resources.setSrcDirs(listOf(projectDir.resolve("resources"))) + java.setSrcDirs(listOf(projectDir.resolve("src"))) + } + findByName("test")?.apply { + resources.setSrcDirs(listOf(projectDir.resolve("resources"))) + java.setSrcDirs(listOf(projectDir.resolve("test"))) + } + } +} + +fun Project.configureKotlinExperimentalUsages() { + val sourceSets = kotlinSourceSets ?: return + + for (target in sourceSets) { + experimentalAnnotations.forEach { a -> + target.languageSettings.useExperimentalAnnotation(a) + //target.languageSettings.enableLanguageFeature("InlineClasses") + } + } +} + +val Project.kotlinSourceSets get() = extensions.findByName("kotlin").safeAs()?.sourceSets + +val Project.kotlinTargets + get() = + extensions.findByName("kotlin").safeAs()?.target?.let { listOf(it) } + ?: extensions.findByName("kotlin").safeAs()?.targets + +val Project.isKotlinJvmProject: Boolean get() = extensions.findByName("kotlin") is KotlinJvmProjectExtension +val Project.isKotlinMpp: Boolean get() = extensions.findByName("kotlin") is KotlinMultiplatformExtension + +val Project.kotlinCompilations + get() = kotlinTargets?.flatMap { it.compilations } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/SetCompileTargetPlugin.kt b/buildSrc/src/main/kotlin/SetCompileTargetPlugin.kt deleted file mode 100644 index 0757d72cf..000000000 --- a/buildSrc/src/main/kotlin/SetCompileTargetPlugin.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2019-2020 Mamoe Technologies and contributors. - * - * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. - * Use of this source code is governed by the GNU AFFERO GENERAL PUBLIC LICENSE version 3 license that can be found through the following link. - * - * https://github.com/mamoe/mirai/blob/master/LICENSE - */ - -import org.gradle.api.JavaVersion -import org.gradle.api.Project -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.tasks.compile.JavaCompile -import java.lang.reflect.Method -import kotlin.reflect.KClass - - -fun Any.reflectMethod(name: String, vararg params: KClass): Pair { - return this to this::class.java.getMethod(name, *params.map { it.java }.toTypedArray()) -} - -operator fun Pair.invoke(vararg args: Any?): Any? { - return second.invoke(first, *args) -} - -@Suppress("NOTHING_TO_INLINE") // or error -fun Project.setJavaCompileTarget() { - tasks.filter { it.name in arrayOf("compileKotlin", "compileTestKotlin") }.forEach { task -> - task - .reflectMethod("getKotlinOptions")()!! - .reflectMethod("setJvmTarget", String::class)("1.8") - } - - - kotlin.runCatching { // apply only when java plugin is available - (extensions.getByName("java") as JavaPluginExtension).run { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - tasks.withType(JavaCompile::class.java) { - options.encoding = "UTF8" - } - } -} \ No newline at end of file diff --git a/docs/Commands.md b/docs/Commands.md index 816884f77..0fad7bcf8 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -1,47 +1,47 @@ # Mirai Console Backend - Commands -[`Plugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/Plugin.kt -[`PluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDescription.kt -[`PluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoader.kt -[`PluginManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginManager.kt -[`JvmPluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt -[`JvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt -[`JvmPluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt -[`AbstractJvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt -[`KotlinPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt -[`JavaPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPlugin.kt +[`Plugin`]: ../backend/mirai-console/src/plugin/Plugin.kt +[`PluginDescription`]: ../backend/mirai-console/src/plugin/description/PluginDescription.kt +[`PluginLoader`]: ../backend/mirai-console/src/plugin/loader/PluginLoader.kt +[`PluginManager`]: ../backend/mirai-console/src/plugin/PluginManager.kt +[`JvmPluginLoader`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginLoader.kt +[`JvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/JvmPlugin.kt +[`JvmPluginDescription`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginDescription.kt +[`AbstractJvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/AbstractJvmPlugin.kt +[`KotlinPlugin`]: ../backend/mirai-console/src/plugin/jvm/KotlinPlugin.kt +[`JavaPlugin`]: ../backend/mirai-console/src/plugin/jvm/JavaPlugin.kt -[`Value`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/Value.kt -[`PluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginData.kt -[`AbstractPluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AbstractPluginData.kt -[`AutoSavePluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginData.kt -[`AutoSavePluginConfig`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginConfig.kt -[`PluginConfig`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginConfig.kt -[`PluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt -[`MultiFilePluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt#L116 -[`MemoryPluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt#L100 -[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt#L45 -[`PluginDataHolder`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt -[`PluginDataExtensions`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataExtensions.kt +[`Value`]: ../backend/mirai-console/src/data/Value.kt +[`PluginData`]: ../backend/mirai-console/src/data/PluginData.kt +[`AbstractPluginData`]: ../backend/mirai-console/src/data/AbstractPluginData.kt +[`AutoSavePluginData`]: ../backend/mirai-console/src/data/AutoSavePluginData.kt +[`AutoSavePluginConfig`]: ../backend/mirai-console/src/data/AutoSavePluginConfig.kt +[`PluginConfig`]: ../backend/mirai-console/src/data/PluginConfig.kt +[`PluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt +[`MultiFilePluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt#L116 +[`MemoryPluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt#L100 +[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/data/PluginDataHolder.kt#L45 +[`PluginDataHolder`]: ../backend/mirai-console/src/data/PluginDataHolder.kt +[`PluginDataExtensions`]: ../backend/mirai-console/src/data/PluginDataExtensions.kt -[`MiraiConsole`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt -[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt - +[`MiraiConsole`]: ../backend/mirai-console/src/MiraiConsole.kt +[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/MiraiConsoleImplementation.kt + -[`Command`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt -[`AbstractCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt#L90 -[`CompositeCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CompositeCommand.kt -[`SimpleCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/SimpleCommand.kt -[`RawCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt -[`CommandManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt -[`CommandSender`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandSender.kt -[`CommandArgumentParser`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentParser.kt -[`CommandArgumentContext`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentContext.kt -[`CommandArgumentContext.BuiltIns`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentContext.kt#L66 +[`Command`]: ../backend/mirai-console/src/command/Command.kt +[`AbstractCommand`]: ../backend/mirai-console/src/command/Command.kt#L90 +[`CompositeCommand`]: ../backend/mirai-console/src/command/CompositeCommand.kt +[`SimpleCommand`]: ../backend/mirai-console/src/command/SimpleCommand.kt +[`RawCommand`]: ../backend/mirai-console/src/command/RawCommand.kt +[`CommandManager`]: ../backend/mirai-console/src/command/CommandManager.kt +[`CommandSender`]: ../backend/mirai-console/src/command/CommandSender.kt +[`CommandValueArgumentParser`]: ../backend/mirai-console/src/command/descriptor/CommandValueArgumentParser.kt +[`CommandArgumentContext`]: ../backend/mirai-console/src/command/descriptor/CommandArgumentContext.kt +[`CommandArgumentContext.BuiltIns`]: ../backend/mirai-console/src/command/descriptor/CommandArgumentContext.kt#L66 -[`MessageScope`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt +[`MessageScope`]: ../backend/mirai-console/src/util/MessageScope.kt ## [`Command`] @@ -95,7 +95,7 @@ abstract override suspend fun CommandSender.onCommand(args: MessageChain) Mirai Console 为了简化处理指令时的解析过程,设计了参数智能解析。 -### [`CommandArgumentParser`] +### [`CommandValueArgumentParser`] ```kotlin interface CommandArgumentParser { fun parse(raw: String, sender: CommandSender): T @@ -107,13 +107,13 @@ interface CommandArgumentParser { ### [`CommandArgumentContext`] -是 `Class` 到 [`CommandArgumentParser`] 的映射。作用是为某一个类型分配解析器。 +是 `Class` 到 [`CommandValueArgumentParser`] 的映射。作用是为某一个类型分配解析器。 #### [内建 `CommandArgumentContext`][`CommandArgumentContext.BuiltIns`] 支持原生数据类型,`Contact` 及其子类,`Bot`。 #### 构建 [`CommandArgumentContext`] -查看源码内注释:[CommandArgumentContext.kt: Line 146](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/descriptor/CommandArgumentContext.kt#L146-L183) +查看源码内注释:[CommandArgumentContext.kt: Line 146](../backend/mirai-console/src/command/descriptor/CommandArgumentContext.kt#L146-L183) ### 支持参数解析的 [`Command`] 实现 Mirai Console 内建 [`SimpleCommand`] 与 [`CompositeCommand`] 拥有 [`CommandArgumentContext`],在处理参数时会首先解析参数再传递给插件的实现。 @@ -140,8 +140,8 @@ object MySimpleCommand : SimpleCommand( 1. 被分割为 `/`, `"tell"`, `"123456"`, `"Hello"` 2. `MySimpleCommand` 被匹配到,根据 `/` 和 `"test"`。`"123456"`, `"Hello"` 被作为指令的原生参数。 3. 由于 `MySimpleCommand` 定义的 `handle` 需要两个参数, `User` 和 `String`,`"123456"` 需要转换成 `User`,`"Hello"` 需要转换成 `String`。 -4. Console 在 [内建 `CommandArgumentContext`][`CommandArgumentContext.BuiltIns`] 寻找适合于 `User` 的 [`CommandArgumentParser`] -5. `"123456"` 被传入这个 [`CommandArgumentParser`],得到 `User` +4. Console 在 [内建 `CommandArgumentContext`][`CommandArgumentContext.BuiltIns`] 寻找适合于 `User` 的 [`CommandValueArgumentParser`] +5. `"123456"` 被传入这个 [`CommandValueArgumentParser`],得到 `User` 6. `"Hello"` 也会按照 4~5 的步骤转换为 `String` 类型的参数 7. 解析完成的参数被传入 `handle` @@ -253,7 +253,7 @@ ConsoleCommandSender AbstractUserCommandSender | +-----------------------------+----------------------------+---------------+ ``` -有关类型的详细信息,请查看 [CommandSender.kt](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandSender.kt#L48-L135) +有关类型的详细信息,请查看 [CommandSender.kt](../backend/mirai-console/src/command/CommandSender.kt#L48-L135) ### 获取 @@ -263,4 +263,4 @@ ConsoleCommandSender AbstractUserCommandSender | 表示几个消息对象的’域‘,即消息对象的集合。用于最小化将同一条消息发送给多个类型不同的目标的付出。 -参考 [MessageScope](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt#L28-L99) \ No newline at end of file +参考 [MessageScope](../backend/mirai-console/src/util/MessageScope.kt#L28-L99) \ No newline at end of file diff --git a/docs/Extensions.md b/docs/Extensions.md index 6958c0c5b..9a741b0c0 100644 --- a/docs/Extensions.md +++ b/docs/Extensions.md @@ -4,10 +4,10 @@ Mirai Console 拥有灵活的 Extensions API,支持扩展 Console 的一些服 Extensions 属于插件开发的进阶内容。 -[`Extension`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/Extension.kt -[`ExtensionPoint`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ExtensionPoint.kt -[`PluginComponentStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/PluginComponentStorage.kt -[`ComponentStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extension/ComponentStorage.kt +[`Extension`]: ../backend/mirai-console/src/extension/Extension.kt +[`ExtensionPoint`]: ../backend/mirai-console/src/extension/ExtensionPoint.kt +[`PluginComponentStorage`]: ../backend/mirai-console/src/extension/PluginComponentStorage.kt +[`ComponentStorage`]: ../backend/mirai-console/src/extension/ComponentStorage.kt ## [扩展][`Extension`] @@ -34,4 +34,4 @@ object MyPlugin : KotlinPlugin( /* ... */ ) { ### 可用扩展 -查看 [extensions](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/extensions/)。每个文件对应一个扩展。 \ No newline at end of file +查看 [extensions](../backend/mirai-console/src/extensions)。每个文件对应一个扩展。 \ No newline at end of file diff --git a/docs/Permissions.md b/docs/Permissions.md index 6ba743f00..9cb6b0fcd 100644 --- a/docs/Permissions.md +++ b/docs/Permissions.md @@ -2,15 +2,15 @@ 权限系统。 -[`PermissionService`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionService.kt -[`Permission`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt -[`RootPermission`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt#L82 -[`PermissionId`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionId.kt -[`PermissionIdNamespace`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermissionIdNamespace.kt -[`Permittee`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permittee.kt -[`PermitteeId`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermitteeId.kt -[`AbstractPermitteeId`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/PermitteeId.kt#L77 -[`CommandSender`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandSender.kt +[`PermissionService`]: ../backend/mirai-console/src/permission/PermissionService.kt +[`Permission`]: ../backend/mirai-console/src/permission/Permission.kt +[`RootPermission`]: ../backend/mirai-console/src/permission/Permission.kt#L82 +[`PermissionId`]: ../backend/mirai-console/src/permission/PermissionId.kt +[`PermissionIdNamespace`]: ../backend/mirai-console/src/permission/PermissionIdNamespace.kt +[`Permittee`]: ../backend/mirai-console/src/permission/Permittee.kt +[`PermitteeId`]: ../backend/mirai-console/src/permission/PermitteeId.kt +[`AbstractPermitteeId`]: ../backend/mirai-console/src/permission/PermitteeId.kt#L77 +[`CommandSender`]: ../backend/mirai-console/src/command/CommandSender.kt ## 权限 diff --git a/docs/PluginData.md b/docs/PluginData.md index bde09d2c1..c1731f9c3 100644 --- a/docs/PluginData.md +++ b/docs/PluginData.md @@ -1,45 +1,45 @@ # Mirai Console Backend - PluginData -[`Plugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/Plugin.kt -[`PluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDescription.kt -[`PluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoader.kt -[`PluginManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginManager.kt -[`JvmPluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt -[`JvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt -[`JvmPluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt -[`AbstractJvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt -[`KotlinPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt -[`JavaPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPlugin.kt +[`Plugin`]: ../backend/mirai-console/src/plugin/Plugin.kt +[`PluginDescription`]: ../backend/mirai-console/src/plugin/description/PluginDescription.kt +[`PluginLoader`]: ../backend/mirai-console/src/plugin/loader/PluginLoader.kt +[`PluginManager`]: ../backend/mirai-console/src/plugin/PluginManager.kt +[`JvmPluginLoader`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginLoader.kt +[`JvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/JvmPlugin.kt +[`JvmPluginDescription`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginDescription.kt +[`AbstractJvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/AbstractJvmPlugin.kt +[`KotlinPlugin`]: ../backend/mirai-console/src/plugin/jvm/KotlinPlugin.kt +[`JavaPlugin`]: ../backend/mirai-console/src/plugin/jvm/JavaPlugin.kt -[`Value`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/Value.kt -[`PluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginData.kt -[`AbstractPluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AbstractPluginData.kt -[`AutoSavePluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginData.kt -[`AutoSavePluginConfig`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/AutoSavePluginConfig.kt -[`PluginConfig`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginConfig.kt -[`PluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt -[`MultiFilePluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt#L116 -[`MemoryPluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt#L100 -[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt#L45 -[`PluginDataHolder`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt -[`PluginDataExtensions`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataExtensions.kt +[`Value`]: ../backend/mirai-console/src/data/Value.kt +[`PluginData`]: ../backend/mirai-console/src/data/PluginData.kt +[`AbstractPluginData`]: ../backend/mirai-console/src/data/AbstractPluginData.kt +[`AutoSavePluginData`]: ../backend/mirai-console/src/data/AutoSavePluginData.kt +[`AutoSavePluginConfig`]: ../backend/mirai-console/src/data/AutoSavePluginConfig.kt +[`PluginConfig`]: ../backend/mirai-console/src/data/PluginConfig.kt +[`PluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt +[`MultiFilePluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt#L116 +[`MemoryPluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt#L100 +[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/data/PluginDataHolder.kt#L45 +[`PluginDataHolder`]: ../backend/mirai-console/src/data/PluginDataHolder.kt +[`PluginDataExtensions`]: ../backend/mirai-console/src/data/PluginDataExtensions.kt -[`MiraiConsole`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt -[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt - +[`MiraiConsole`]: ../backend/mirai-console/src/MiraiConsole.kt +[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/MiraiConsoleImplementation.kt + -[`Command`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt -[`CompositeCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CompositeCommand.kt -[`SimpleCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/SimpleCommand.kt -[`RawCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt -[`CommandManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt +[`Command`]: ../backend/mirai-console/src/command/Command.kt +[`CompositeCommand`]: ../backend/mirai-console/src/command/CompositeCommand.kt +[`SimpleCommand`]: ../backend/mirai-console/src/command/SimpleCommand.kt +[`RawCommand`]: ../backend/mirai-console/src/command/RawCommand.kt +[`CommandManager`]: ../backend/mirai-console/src/command/CommandManager.kt -[`Annotations`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/Annotations.kt -[`ConsoleInput`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ConsoleInput.kt -[`JavaPluginScheduler`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPluginScheduler.kt -[`ResourceContainer`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/ResourceContainer.kt -[`PluginFileExtensions`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginFileExtensions.kt +[`Annotations`]: ../backend/mirai-console/src/util/Annotations.kt +[`ConsoleInput`]: ../backend/mirai-console/src/util/ConsoleInput.kt +[`JavaPluginScheduler`]: ../backend/mirai-console/src/plugin/jvm/JavaPluginScheduler.kt +[`ResourceContainer`]: ../backend/mirai-console/src/plugin/ResourceContainer.kt +[`PluginFileExtensions`]: ../backend/mirai-console/src/plugin/PluginFileExtensions.kt [Kotlin]: https://www.kotlincn.net/ [Java]: https://www.java.com/zh_CN/ @@ -116,7 +116,7 @@ object MyData : AutoSavePluginData() { *由于 Java 语法局限,为 Kotlin 而设计的 PluginData 在 Java 使用很复杂。* *即使 Mirai Console 为 Java 提供适配器,也强烈推荐 Java 用户在项目中混用 Kotlin 代码来完成数据模型定义。* -参考 [JAutoSavePluginData](../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/java/JAutoSavePluginData.kt#L69) +参考 [JAutoSavePluginData](../backend/mirai-console/src/data/java/JAutoSavePluginData.kt#L69) ### 非引用赋值 由于实现特殊, 赋值时不会写其引用. 即: diff --git a/docs/Plugins.md b/docs/Plugins.md index f472c8f30..63cee40f7 100644 --- a/docs/Plugins.md +++ b/docs/Plugins.md @@ -1,39 +1,39 @@ # Mirai Console Backend - Plugins -[`Plugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/Plugin.kt -[`PluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/description/PluginDescription.kt -[`PluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/loader/PluginLoader.kt -[`PluginManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginManager.kt -[`JvmPluginLoader`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt -[`JvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt -[`JvmPluginDescription`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt -[`AbstractJvmPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt -[`KotlinPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt -[`JavaPlugin`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPlugin.kt +[`Plugin`]: ../backend/mirai-console/src/plugin/Plugin.kt +[`PluginDescription`]: ../backend/mirai-console/src/plugin/description/PluginDescription.kt +[`PluginLoader`]: ../backend/mirai-console/src/plugin/loader/PluginLoader.kt +[`PluginManager`]: ../backend/mirai-console/src/plugin/PluginManager.kt +[`JvmPluginLoader`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginLoader.kt +[`JvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/JvmPlugin.kt +[`JvmPluginDescription`]: ../backend/mirai-console/src/plugin/jvm/JvmPluginDescription.kt +[`AbstractJvmPlugin`]: ../backend/mirai-console/src/plugin/jvm/AbstractJvmPlugin.kt +[`KotlinPlugin`]: ../backend/mirai-console/src/plugin/jvm/KotlinPlugin.kt +[`JavaPlugin`]: ../backend/mirai-console/src/plugin/jvm/JavaPlugin.kt -[`PluginData`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginData.kt -[`PluginConfig`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginConfig.kt -[`PluginDataStorage`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt +[`PluginData`]: ../backend/mirai-console/src/data/PluginData.kt +[`PluginConfig`]: ../backend/mirai-console/src/data/PluginConfig.kt +[`PluginDataStorage`]: ../backend/mirai-console/src/data/PluginDataStorage.kt -[`ExportManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/ExportManager.kt +[`ExportManager`]: ../backend/mirai-console/src/plugin/jvm/ExportManager.kt -[`MiraiConsole`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt -[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt - +[`MiraiConsole`]: ../backend/mirai-console/src/MiraiConsole.kt +[`MiraiConsoleImplementation`]: ../backend/mirai-console/src/MiraiConsoleImplementation.kt + -[`Command`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/Command.kt -[`CompositeCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CompositeCommand.kt -[`SimpleCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/SimpleCommand.kt -[`RawCommand`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/RawCommand.kt -[`CommandManager`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandManager.kt +[`Command`]: ../backend/mirai-console/src/command/Command.kt +[`CompositeCommand`]: ../backend/mirai-console/src/command/CompositeCommand.kt +[`SimpleCommand`]: ../backend/mirai-console/src/command/SimpleCommand.kt +[`RawCommand`]: ../backend/mirai-console/src/command/RawCommand.kt +[`CommandManager`]: ../backend/mirai-console/src/command/CommandManager.kt -[`Annotations`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/Annotations.kt -[`ConsoleInput`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/ConsoleInput.kt -[`JavaPluginScheduler`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JavaPluginScheduler.kt -[`ResourceContainer`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/ResourceContainer.kt -[`PluginFileExtensions`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginFileExtensions.kt -[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataHolder.kt#L45 +[`Annotations`]: ../backend/mirai-console/src/util/Annotations.kt +[`ConsoleInput`]: ../backend/mirai-console/src/util/ConsoleInput.kt +[`JavaPluginScheduler`]: ../backend/mirai-console/src/plugin/jvm/JavaPluginScheduler.kt +[`ResourceContainer`]: ../backend/mirai-console/src/plugin/ResourceContainer.kt +[`PluginFileExtensions`]: ../backend/mirai-console/src/plugin/PluginFileExtensions.kt +[`AutoSavePluginDataHolder`]: ../backend/mirai-console/src/data/PluginDataHolder.kt#L45 [Kotlin]: https://www.kotlincn.net/ [Java]: https://www.java.com/zh_CN/ diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt b/frontend/mirai-console-graphical/src/MiraiConsoleGraphicalLoader.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt rename to frontend/mirai-console-graphical/src/MiraiConsoleGraphicalLoader.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt b/frontend/mirai-console-graphical/src/MiraiGraphical.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiGraphical.kt rename to frontend/mirai-console-graphical/src/MiraiGraphical.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalFrontEndController.kt b/frontend/mirai-console-graphical/src/controller/MiraiGraphicalFrontEndController.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalFrontEndController.kt rename to frontend/mirai-console-graphical/src/controller/MiraiGraphicalFrontEndController.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/event/ReloadEvent.kt b/frontend/mirai-console-graphical/src/event/ReloadEvent.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/event/ReloadEvent.kt rename to frontend/mirai-console-graphical/src/event/ReloadEvent.kt diff --git a/frontend/mirai-console-graphical/src/main/resources/character.png b/frontend/mirai-console-graphical/src/main/resources/character.png deleted file mode 100644 index b55153f1e..000000000 Binary files a/frontend/mirai-console-graphical/src/main/resources/character.png and /dev/null differ diff --git a/frontend/mirai-console-graphical/src/main/resources/logo.png b/frontend/mirai-console-graphical/src/main/resources/logo.png deleted file mode 100644 index f0fd0064e..000000000 Binary files a/frontend/mirai-console-graphical/src/main/resources/logo.png and /dev/null differ diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/BotModel.kt b/frontend/mirai-console-graphical/src/model/BotModel.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/BotModel.kt rename to frontend/mirai-console-graphical/src/model/BotModel.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/ConsoleInfo.kt b/frontend/mirai-console-graphical/src/model/ConsoleInfo.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/ConsoleInfo.kt rename to frontend/mirai-console-graphical/src/model/ConsoleInfo.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/GlobalSetting.kt b/frontend/mirai-console-graphical/src/model/GlobalSetting.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/GlobalSetting.kt rename to frontend/mirai-console-graphical/src/model/GlobalSetting.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/PluginModel.kt b/frontend/mirai-console-graphical/src/model/PluginModel.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/PluginModel.kt rename to frontend/mirai-console-graphical/src/model/PluginModel.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/VerificationCodeModel.kt b/frontend/mirai-console-graphical/src/model/VerificationCodeModel.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/model/VerificationCodeModel.kt rename to frontend/mirai-console-graphical/src/model/VerificationCodeModel.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt b/frontend/mirai-console-graphical/src/stylesheet/BaseStyleSheet.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/BaseStyleSheet.kt rename to frontend/mirai-console-graphical/src/stylesheet/BaseStyleSheet.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt b/frontend/mirai-console-graphical/src/stylesheet/LoginViewStyleSheet.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/LoginViewStyleSheet.kt rename to frontend/mirai-console-graphical/src/stylesheet/LoginViewStyleSheet.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt b/frontend/mirai-console-graphical/src/stylesheet/PluginViewStyleSheet.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PluginViewStyleSheet.kt rename to frontend/mirai-console-graphical/src/stylesheet/PluginViewStyleSheet.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt b/frontend/mirai-console-graphical/src/stylesheet/PrimaryStyleSheet.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/stylesheet/PrimaryStyleSheet.kt rename to frontend/mirai-console-graphical/src/stylesheet/PrimaryStyleSheet.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/JFoenixAdaptor.kt b/frontend/mirai-console-graphical/src/util/JFoenixAdaptor.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/JFoenixAdaptor.kt rename to frontend/mirai-console-graphical/src/util/JFoenixAdaptor.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/SVG.kt b/frontend/mirai-console-graphical/src/util/SVG.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/SVG.kt rename to frontend/mirai-console-graphical/src/util/SVG.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/controls.kt b/frontend/mirai-console-graphical/src/util/controls.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/util/controls.kt rename to frontend/mirai-console-graphical/src/util/controls.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/Decorator.kt b/frontend/mirai-console-graphical/src/view/Decorator.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/Decorator.kt rename to frontend/mirai-console-graphical/src/view/Decorator.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt b/frontend/mirai-console-graphical/src/view/LoginView.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/LoginView.kt rename to frontend/mirai-console-graphical/src/view/LoginView.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsCenterView.kt b/frontend/mirai-console-graphical/src/view/PluginsCenterView.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsCenterView.kt rename to frontend/mirai-console-graphical/src/view/PluginsCenterView.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt b/frontend/mirai-console-graphical/src/view/PluginsView.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PluginsView.kt rename to frontend/mirai-console-graphical/src/view/PluginsView.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt b/frontend/mirai-console-graphical/src/view/PrimaryView.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/PrimaryView.kt rename to frontend/mirai-console-graphical/src/view/PrimaryView.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/SettingsView.kt b/frontend/mirai-console-graphical/src/view/SettingsView.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/SettingsView.kt rename to frontend/mirai-console-graphical/src/view/SettingsView.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/InputDialog.kt b/frontend/mirai-console-graphical/src/view/dialog/InputDialog.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/InputDialog.kt rename to frontend/mirai-console-graphical/src/view/dialog/InputDialog.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/PluginDetailFragment.kt b/frontend/mirai-console-graphical/src/view/dialog/PluginDetailFragment.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/PluginDetailFragment.kt rename to frontend/mirai-console-graphical/src/view/dialog/PluginDetailFragment.kt diff --git a/frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/VerificationCodeFragment.kt b/frontend/mirai-console-graphical/src/view/dialog/VerificationCodeFragment.kt similarity index 100% rename from frontend/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/view/dialog/VerificationCodeFragment.kt rename to frontend/mirai-console-graphical/src/view/dialog/VerificationCodeFragment.kt diff --git a/frontend/mirai-console-graphical/src/test/kotlin/Main.kt b/frontend/mirai-console-graphical/test/Main.kt similarity index 100% rename from frontend/mirai-console-graphical/src/test/kotlin/Main.kt rename to frontend/mirai-console-graphical/test/Main.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/BufferedOutputStream.kt b/frontend/mirai-console-terminal/src/BufferedOutputStream.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/BufferedOutputStream.kt rename to frontend/mirai-console-terminal/src/BufferedOutputStream.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleInputImpl.kt b/frontend/mirai-console-terminal/src/ConsoleInputImpl.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleInputImpl.kt rename to frontend/mirai-console-terminal/src/ConsoleInputImpl.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleTerminalSettings.kt b/frontend/mirai-console-terminal/src/ConsoleTerminalSettings.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleTerminalSettings.kt rename to frontend/mirai-console-terminal/src/ConsoleTerminalSettings.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleThread.kt b/frontend/mirai-console-terminal/src/ConsoleThread.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/ConsoleThread.kt rename to frontend/mirai-console-terminal/src/ConsoleThread.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/MiraiConsoleImplementationTerminal.kt b/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/MiraiConsoleImplementationTerminal.kt rename to frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/MiraiConsoleTerminalLoader.kt b/frontend/mirai-console-terminal/src/MiraiConsoleTerminalLoader.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/MiraiConsoleTerminalLoader.kt rename to frontend/mirai-console-terminal/src/MiraiConsoleTerminalLoader.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt b/frontend/mirai-console-terminal/src/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt rename to frontend/mirai-console-terminal/src/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt diff --git a/frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/noconsole/NoConsole.kt b/frontend/mirai-console-terminal/src/noconsole/NoConsole.kt similarity index 100% rename from frontend/mirai-console-terminal/src/main/kotlin/net/mamoe/mirai/console/terminal/noconsole/NoConsole.kt rename to frontend/mirai-console-terminal/src/noconsole/NoConsole.kt diff --git a/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt b/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt index 051334a0a..03d21ea9e 100644 --- a/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt +++ b/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt @@ -6,36 +6,53 @@ * * https://github.com/mamoe/mirai/blob/master/LICENSE */ +package net.mamoe.mirai.console.compiler.common.diagnostics -package net.mamoe.mirai.console.compiler.common.diagnostics; +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.descriptors.ClassDescriptor +import org.jetbrains.kotlin.diagnostics.DiagnosticFactory1.create +import org.jetbrains.kotlin.diagnostics.DiagnosticFactory2.create +import org.jetbrains.kotlin.diagnostics.Errors +import org.jetbrains.kotlin.diagnostics.Severity.ERROR +import org.jetbrains.kotlin.psi.KtNamedDeclaration -import com.intellij.psi.PsiElement; -import org.jetbrains.kotlin.descriptors.ClassDescriptor; -import org.jetbrains.kotlin.diagnostics.DiagnosticFactory1; -import org.jetbrains.kotlin.diagnostics.DiagnosticFactory2; -import org.jetbrains.kotlin.diagnostics.Errors; -import org.jetbrains.kotlin.psi.KtNamedDeclaration; +object MiraiConsoleErrors { + @JvmStatic + val ILLEGAL_PLUGIN_DESCRIPTION = create(ERROR) -import static org.jetbrains.kotlin.diagnostics.Severity.ERROR; + @JvmStatic + val NOT_CONSTRUCTABLE_TYPE = create(ERROR) -public interface MiraiConsoleErrors { - DiagnosticFactory1 ILLEGAL_PLUGIN_DESCRIPTION = DiagnosticFactory1.create(ERROR); - DiagnosticFactory1 NOT_CONSTRUCTABLE_TYPE = DiagnosticFactory1.create(ERROR); - DiagnosticFactory1 UNSERIALIZABLE_TYPE = DiagnosticFactory1.create(ERROR); - DiagnosticFactory2 ILLEGAL_COMMAND_NAME = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 ILLEGAL_PERMISSION_NAME = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 ILLEGAL_PERMISSION_ID = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 ILLEGAL_PERMISSION_NAMESPACE = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 ILLEGAL_COMMAND_REGISTER_USE = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 ILLEGAL_PERMISSION_REGISTER_USE = DiagnosticFactory2.create(ERROR); + @JvmStatic + val UNSERIALIZABLE_TYPE = create(ERROR) - @Deprecated - Object _init = new Object() { - { + @JvmStatic + val ILLEGAL_COMMAND_NAME = create(ERROR) + + @JvmStatic + val ILLEGAL_PERMISSION_NAME = create(ERROR) + + @JvmStatic + val ILLEGAL_PERMISSION_ID = create(ERROR) + + @JvmStatic + val ILLEGAL_PERMISSION_NAMESPACE = create(ERROR) + + @JvmStatic + val ILLEGAL_COMMAND_REGISTER_USE = create(ERROR) + + @JvmStatic + val ILLEGAL_PERMISSION_REGISTER_USE = create(ERROR) + + @Suppress("ObjectPropertyName", "unused") + @JvmStatic + @Deprecated("", level = DeprecationLevel.ERROR) + val _init: Any = object : Any() { + init { Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages( - MiraiConsoleErrors.class, - MiraiConsoleErrorsRendering.INSTANCE - ); + MiraiConsoleErrors::class.java, + MiraiConsoleErrorsRendering + ) } - }; -} + } +} \ No newline at end of file diff --git a/tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/diagnostics/MiraiConsoleErrorsRendering.kt b/tools/compiler-common/src/diagnostics/MiraiConsoleErrorsRendering.kt similarity index 73% rename from tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/diagnostics/MiraiConsoleErrorsRendering.kt rename to tools/compiler-common/src/diagnostics/MiraiConsoleErrorsRendering.kt index 01a0d34d6..734a3a02a 100644 --- a/tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/diagnostics/MiraiConsoleErrorsRendering.kt +++ b/tools/compiler-common/src/diagnostics/MiraiConsoleErrorsRendering.kt @@ -9,7 +9,15 @@ package net.mamoe.mirai.console.compiler.common.diagnostics -import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.* +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_COMMAND_NAME +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_COMMAND_REGISTER_USE +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_ID +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_NAME +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_NAMESPACE +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_REGISTER_USE +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PLUGIN_DESCRIPTION +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.NOT_CONSTRUCTABLE_TYPE +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.UNSERIALIZABLE_TYPE import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap import org.jetbrains.kotlin.diagnostics.rendering.Renderers diff --git a/tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/resolve/resolveCommon.kt b/tools/compiler-common/src/resolve/resolveCommon.kt similarity index 100% rename from tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/resolve/resolveCommon.kt rename to tools/compiler-common/src/resolve/resolveCommon.kt diff --git a/tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/resolve/resolveTypes.kt b/tools/compiler-common/src/resolve/resolveTypes.kt similarity index 100% rename from tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/resolve/resolveTypes.kt rename to tools/compiler-common/src/resolve/resolveTypes.kt diff --git a/tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/utilCommon.kt b/tools/compiler-common/src/utilCommon.kt similarity index 100% rename from tools/compiler-common/src/main/kotlin/net/mamoe/mirai/console/compiler/common/utilCommon.kt rename to tools/compiler-common/src/utilCommon.kt diff --git a/tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/IGNORED_DEPENDENCIES_IN_SHADOW.kt b/tools/gradle-plugin/src/IGNORED_DEPENDENCIES_IN_SHADOW.kt similarity index 100% rename from tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/IGNORED_DEPENDENCIES_IN_SHADOW.kt rename to tools/gradle-plugin/src/IGNORED_DEPENDENCIES_IN_SHADOW.kt diff --git a/tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/MiraiConsoleExtension.kt b/tools/gradle-plugin/src/MiraiConsoleExtension.kt similarity index 100% rename from tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/MiraiConsoleExtension.kt rename to tools/gradle-plugin/src/MiraiConsoleExtension.kt diff --git a/tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/MiraiConsoleGradlePlugin.kt b/tools/gradle-plugin/src/MiraiConsoleGradlePlugin.kt similarity index 100% rename from tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/MiraiConsoleGradlePlugin.kt rename to tools/gradle-plugin/src/MiraiConsoleGradlePlugin.kt diff --git a/tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/VersionConstants.kt b/tools/gradle-plugin/src/VersionConstants.kt similarity index 100% rename from tools/gradle-plugin/src/main/kotlin/net/mamoe/mirai/console/gradle/VersionConstants.kt rename to tools/gradle-plugin/src/VersionConstants.kt diff --git a/tools/intellij-plugin/README.md b/tools/intellij-plugin/README.md index 1d79320c2..e1b3021a4 100644 --- a/tools/intellij-plugin/README.md +++ b/tools/intellij-plugin/README.md @@ -10,7 +10,7 @@ IntelliJ 平台的 Mirai Console 开发插件 [PluginDescriptionChecker.kt](src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDescriptionChecker.kt#L34) -- 使用 [ResolveContext](../../backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/compiler/common/ResolveContext.kt) +- 使用 [ResolveContext](../../backend/mirai-console/src/common/ResolveContext.kt) - 检测 Plugin Id, Plugin Name, Plugin Version 的合法性. 并在非法时提示正确的语法. - 支持编译期常量 diff --git a/tools/intellij-plugin/src/main/resources/META-INF/plugin.xml b/tools/intellij-plugin/resources/META-INF/plugin.xml similarity index 100% rename from tools/intellij-plugin/src/main/resources/META-INF/plugin.xml rename to tools/intellij-plugin/resources/META-INF/plugin.xml diff --git a/tools/intellij-plugin/src/main/resources/icons/commandDeclaration.svg b/tools/intellij-plugin/resources/icons/commandDeclaration.svg similarity index 100% rename from tools/intellij-plugin/src/main/resources/icons/commandDeclaration.svg rename to tools/intellij-plugin/resources/icons/commandDeclaration.svg diff --git a/tools/intellij-plugin/src/main/resources/icons/pluginIcon.svg b/tools/intellij-plugin/resources/icons/pluginIcon.svg similarity index 100% rename from tools/intellij-plugin/src/main/resources/icons/pluginIcon.svg rename to tools/intellij-plugin/resources/icons/pluginIcon.svg diff --git a/tools/intellij-plugin/resources/icons/pluginMainDeclaration.png b/tools/intellij-plugin/resources/icons/pluginMainDeclaration.png new file mode 100644 index 000000000..386d238b2 Binary files /dev/null and b/tools/intellij-plugin/resources/icons/pluginMainDeclaration.png differ diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt b/tools/intellij-plugin/src/IDEContainerContributor.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/IDEContainerContributor.kt rename to tools/intellij-plugin/src/IDEContainerContributor.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt b/tools/intellij-plugin/src/Icons.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/Icons.kt rename to tools/intellij-plugin/src/Icons.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/QuickFixRegistrar.kt b/tools/intellij-plugin/src/QuickFixRegistrar.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/QuickFixRegistrar.kt rename to tools/intellij-plugin/src/QuickFixRegistrar.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/ContextualParametersChecker.kt b/tools/intellij-plugin/src/diagnostics/ContextualParametersChecker.kt similarity index 95% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/ContextualParametersChecker.kt rename to tools/intellij-plugin/src/diagnostics/ContextualParametersChecker.kt index 31b722281..67d62adc1 100644 --- a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/ContextualParametersChecker.kt +++ b/tools/intellij-plugin/src/diagnostics/ContextualParametersChecker.kt @@ -10,7 +10,11 @@ package net.mamoe.mirai.console.intellij.diagnostics import com.intellij.psi.PsiElement -import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.* +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_COMMAND_NAME +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_ID +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_NAME +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PERMISSION_NAMESPACE +import net.mamoe.mirai.console.compiler.common.diagnostics.MiraiConsoleErrors.ILLEGAL_PLUGIN_DESCRIPTION import net.mamoe.mirai.console.compiler.common.resolve.ResolveContextKind import net.mamoe.mirai.console.compiler.common.resolve.resolveContextKinds import net.mamoe.mirai.console.intellij.resolve.resolveAllCalls diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDataValuesChecker.kt b/tools/intellij-plugin/src/diagnostics/PluginDataValuesChecker.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/PluginDataValuesChecker.kt rename to tools/intellij-plugin/src/diagnostics/PluginDataValuesChecker.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/diagnosticsUtil.kt b/tools/intellij-plugin/src/diagnostics/diagnosticsUtil.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/diagnosticsUtil.kt rename to tools/intellij-plugin/src/diagnostics/diagnosticsUtil.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/fix/AbuseYellowIntention.kt b/tools/intellij-plugin/src/diagnostics/fix/AbuseYellowIntention.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/fix/AbuseYellowIntention.kt rename to tools/intellij-plugin/src/diagnostics/fix/AbuseYellowIntention.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/fix/AddSerializerFix.kt b/tools/intellij-plugin/src/diagnostics/fix/AddSerializerFix.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/diagnostics/fix/AddSerializerFix.kt rename to tools/intellij-plugin/src/diagnostics/fix/AddSerializerFix.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt b/tools/intellij-plugin/src/line/marker/CommandDeclarationLineMarkerProvider.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/CommandDeclarationLineMarkerProvider.kt rename to tools/intellij-plugin/src/line/marker/CommandDeclarationLineMarkerProvider.kt diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt b/tools/intellij-plugin/src/line/marker/PluginMainLineMarkerProvider.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/line/marker/PluginMainLineMarkerProvider.kt rename to tools/intellij-plugin/src/line/marker/PluginMainLineMarkerProvider.kt diff --git a/tools/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png b/tools/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png deleted file mode 100644 index 7b107ff3d..000000000 Binary files a/tools/intellij-plugin/src/main/resources/icons/pluginMainDeclaration.png and /dev/null differ diff --git a/tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/resolveIdea.kt b/tools/intellij-plugin/src/resolve/resolveIdea.kt similarity index 100% rename from tools/intellij-plugin/src/main/kotlin/net/mamoe/mirai/console/intellij/resolve/resolveIdea.kt rename to tools/intellij-plugin/src/resolve/resolveIdea.kt