Avoid resolution ambiguity

This commit is contained in:
Him188 2020-09-12 22:46:41 +08:00
parent fd23a03618
commit b173b9ad30
2 changed files with 6 additions and 10 deletions

View File

@ -146,11 +146,9 @@ public class JvmPluginDescriptionBuilder(
public fun dependsOn( public fun dependsOn(
pluginId: String, pluginId: String,
isOptional: Boolean = false, isOptional: Boolean = false,
versionRequirement: VersionRequirement? = null, versionRequirement: VersionRequirement,
): JvmPluginDescriptionBuilder = apply { ): JvmPluginDescriptionBuilder = apply {
if (versionRequirement == null) this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional))
this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional))
else this.dependencies.add(PluginDependency(pluginId, versionRequirement, isOptional))
} }
/** /**
@ -161,11 +159,9 @@ public class JvmPluginDescriptionBuilder(
@ILoveKuriyamaMiraiForever @ILoveKuriyamaMiraiForever
public fun dependsOn( public fun dependsOn(
pluginId: String, pluginId: String,
versionRequirement: VersionRequirement? = null, versionRequirement: VersionRequirement,
): JvmPluginDescriptionBuilder = apply { ): JvmPluginDescriptionBuilder = apply {
if (versionRequirement == null) this.dependencies.add(PluginDependency(pluginId, versionRequirement, false))
this.dependencies.add(PluginDependency(pluginId, versionRequirement, false))
else this.dependencies.add(PluginDependency(pluginId, versionRequirement, false))
} }
/** /**
@ -178,7 +174,7 @@ public class JvmPluginDescriptionBuilder(
pluginId: String, pluginId: String,
isOptional: Boolean = false, isOptional: Boolean = false,
): JvmPluginDescriptionBuilder = apply { ): JvmPluginDescriptionBuilder = apply {
dependsOn(pluginId, isOptional, null) this.dependencies.add(PluginDependency(pluginId, null, isOptional))
} }
/** /**

View File

@ -9,7 +9,7 @@
object Versions { object Versions {
const val core = "1.2.3" 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 consoleGraphical = "0.0.7"
const val consoleTerminal = "0.1.0" const val consoleTerminal = "0.1.0"
const val consolePure = console const val consolePure = console