Why is the plugin version set to IDE build version?
Answered
I'm currently working on a Pycharm plugin development using:
- gradle-intellij-plugin v2.1.0
- gradle 8.2
Problem: Plugin version display as “232….” after installation
Root build.gradle:
plugins {
id('org.jetbrains.intellij.platform') version '2.1.0'
id("java")
}
group = pluginGroup
version = pluginVersion
repositories {
//...
}
dependencies {
intellijPlatform {
pycharmCommunity '2022.3'
pluginModule(implementation(project(':submodule')))
instrumentationTools()
}
}
tasks {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
compileJava.options.encoding = 'UTF-8'
patchPluginXml {
sinceBuild = "223.7571.182"
}
}
File gradle.properties:
javaVersion = 17
pluginVersion = 1.4.0-beta1
pluginGroup = com.my.group
In the build.gradle of the submodule, there's “version = pluginVersion
” too.
Now after I run gradle-task buildPlugin
, and install the zip file with Pycharm Professional(2023.2.5),the version displays as “232.10227.11
” (which is the build version of the IDE). I expect it to be “1.4.0-beta1
”
Please tell me what I'm missing here.
Please sign in to leave a comment.
Hi,
The IDE displays the information from the Marketplace in the Plugin Manager.
If you want to see your local version and other content, disable the internet connection.
See: https://youtrack.jetbrains.com/issue/MP-5706/Wrong-Plugin-Description
I think the problem is that
patchPluginXml
has never really executed. I unzip the jar file from the zip, META-INF/plugin.xml has no<version>
tag (or<idea-version>
)Did I miss something in the build.gradle file?
You are probably right.
I suggest basing your script on https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/build.gradle.kts.