Use only hard dependency to java module and use include for jvm.xml (KT-23638)

Trick with both optional/non-optional dependency doesn't work in IDEA,
as it doesn't do an additional check optional dependency is found.

See com.intellij.ide.plugins.PluginManagerCore#checkDependants(
  IdeaPluginDescriptor, Function<PluginId, IdeaPluginDescriptor>,
  Condition<PluginId>, Set<PluginId>)

 #KT-23638 Fixed
This commit is contained in:
Nikolay Krasko
2018-04-11 21:07:56 +03:00
parent 03cca448d3
commit c4917d6d1c
7 changed files with 43 additions and 19 deletions
+7 -1
View File
@@ -30,8 +30,13 @@ val pluginXml by tasks.creating {
doFirst {
val placeholderRegex = Regex(
"""<!-- CLION-PLUGIN-PLACEHOLDER-START -->(.*)<!-- CLION-PLUGIN-PLACEHOLDER-END -->""",
"""<!-- CIDR-PLUGIN-PLACEHOLDER-START -->(.*)<!-- CIDR-PLUGIN-PLACEHOLDER-END -->""",
RegexOption.DOT_MATCHES_ALL)
val excludeRegex = Regex(
"""<!-- CIDR-PLUGIN-EXCLUDE-START -->(.*)<!-- CIDR-PLUGIN-EXCLUDE-END -->""",
RegexOption.DOT_MATCHES_ALL)
val versionRegex = Regex("""<version>([^<]+)</version>""")
zipTree(inputs.files.singleFile)
@@ -39,6 +44,7 @@ val pluginXml by tasks.creating {
.singleFile
.readText()
.replace(placeholderRegex, "")
.replace(excludeRegex, "")
.replace(versionRegex, "<version>$pluginFullVersionNumber</version>")
.also { pluginXmlText ->
outputs.files.singleFile.writeText(pluginXmlText)