intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Archive name not based on plugin configuration

Open Macariel opened this issue 1 year ago • 0 comments

What happened?

According to the documentation for the buildPlugin task it says that By default, the archiveBaseName is set to the plugin name specified in the plugin.xml file, after it gets patched with the [patchPluginXml](https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#patchPluginXml) task. This does not seem to be the case as we have this code

intellijPlatform {
    pluginConfiguration {
        name.set("com.abc.ide.intellij")
        ....
    }
}

But the archive, after building it, is always intellij-2024.7.0-SNAPSHOT.zip . It actually doesn't matter what name is set to, it's just incidental that it ends with intellij as well.

Looking at the plugin.xml produced by patchPluginXml

<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude" require-restart="true">
  <id>com.abc.ide.intellij</id>
  <name>com.abc.ide.intellij</name>
  <version>2024.7.0-SNAPSHOT</version>
   ....

Not sure where the name intelli is coming :shrug: , maybe the project/folder name?

Workaround is to set the base name explicitly

tasks.buildPlugin {
    archiveBaseName = intellijPlatform.pluginConfiguration.name.get()
}

Relevant log output or stack trace

No response

Steps to reproduce

Just configure your plugin and set the property name to anything and see if the buildPlugin tasks actually correctly uses this value.

Gradle IntelliJ Plugin version

2.0.0

Gradle version

8.9

Operating System

Linux

Link to build, i.e. failing GitHub Action job

No response

Macariel avatar Aug 07 '24 12:08 Macariel