diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt index cb4807447..ca417b356 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt @@ -146,11 +146,9 @@ public class JvmPluginDescriptionBuilder( public fun dependsOn( pluginId: String, isOptional: Boolean = false, - versionRequirement: VersionRequirement? = null, + versionRequirement: VersionRequirement, ): JvmPluginDescriptionBuilder = apply { - if (versionRequirement == null) - this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional)) - else this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional)) + this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional)) } /** @@ -161,11 +159,9 @@ public class JvmPluginDescriptionBuilder( @ILoveKuriyamaMiraiForever public fun dependsOn( pluginId: String, - versionRequirement: VersionRequirement? = null, + versionRequirement: VersionRequirement, ): JvmPluginDescriptionBuilder = apply { - if (versionRequirement == null) - this.dependencies.add(PluginDependency(pluginId, versionRequirement, false)) - else this.dependencies.add(PluginDependency(pluginId, versionRequirement, false)) + this.dependencies.add(PluginDependency(pluginId, versionRequirement, false)) } /** @@ -178,7 +174,7 @@ public class JvmPluginDescriptionBuilder( pluginId: String, isOptional: Boolean = false, ): JvmPluginDescriptionBuilder = apply { - dependsOn(pluginId, isOptional, null) + this.dependencies.add(PluginDependency(pluginId, null, isOptional)) } /** diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index cafefdb5d..c7751de90 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -9,7 +9,7 @@ object Versions { const val core = "1.2.3" - const val console = "1.0-M4-dev-10" + const val console = "1.0-M4-dev-11" const val consoleGraphical = "0.0.7" const val consoleTerminal = "0.1.0" const val consolePure = console