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:
@@ -27,11 +27,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2822,6 +2821,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2824,6 +2823,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2822,6 +2821,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -28,11 +28,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2823,6 +2822,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -28,11 +28,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2823,6 +2822,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -29,11 +29,10 @@
|
||||
|
||||
<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->
|
||||
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-START -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-START -->
|
||||
<depends>com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="jvm.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
|
||||
<!-- CLION-PLUGIN-PLACEHOLDER-END -->
|
||||
<!-- CIDR-PLUGIN-PLACEHOLDER-END -->
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
@@ -2824,6 +2823,10 @@
|
||||
<checkinHandlerFactory implementation="org.jetbrains.kotlin.idea.vcs.BunchFileCheckInHandlerFactory"/>
|
||||
</extensions>
|
||||
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-START -->
|
||||
<xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
<!-- CIDR-PLUGIN-EXCLUDE-END -->
|
||||
|
||||
<xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user