Invalid plugin descriptor 'description'
When trying to run most IntelliJ gradle tasks I get this error:
Invalid plugin descriptor 'description'. The plugin description is shorter than 40 characters and/or the plugin description contains non-Latin characters.
This is my build.gradle.kts:
fun properties(key: String) = project.findProperty(key).toString()
plugins {
id("java")
id("idea")
id("org.jetbrains.intellij") version "1.17.1"
id("org.jetbrains.changelog") version "2.1.2"
}
group = properties("pluginGroup")
version = properties("pluginVersion")
dependencies {
implementation("com.google.guava:guava:31.1-jre")
implementation("org.apache.commons:commons-text:1.9")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
}
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
downloadSources.set(properties("platformDownloadSources").toBoolean())
updateSinceUntilBuild.set(true)
plugins.set(
listOf(
"java", "maven"
)
)
}
tasks {
patchPluginXml {
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
pluginDescription.set("A description that is at least 40 characters long")
untilBuild.set(properties("pluginUntilBuild"))
}
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
}
}
changelog {
version.set(properties("pluginVersion"))
groups.set(emptyList())
}
and this an excerpt of my plugin.xml:
<idea-plugin>
<description>A description that is at least 40 characters long</description></idea-plugin>
The description in the xml should not matter, I guess. Nowhere in my code do I have the string “description” so I have no idea where the plugin takes that from.
请先登录再写评论。
Hi Simon,
As your description has more than 40 characters, I suspect that you could somehow paste a non-visible non-Latin character. Please remove your description from both places and write them again from scratch. Also, just in case, remove the build directory before running tasks again. If it doesn't help, please share a minimal reproducible example.
Ooooh that error message is very misleading. “description” is the name of the property, I thought it was the content of the description field.
I don't understand what you mean that it is misleading. Maybe I was unclear in my answer.
The error says that the description is too short or contains illegal characters. As your description has a correct length, I suspect an illegal character (possibly invisible) is present in your description value.
I just misunderstood the message as in that I thought “description” was the content of the description and that the plugin thought “description” (the string) was my plugin description and it pulled that value from somewhere.
The error's on my part, I had a german umlaut in the description which totaly is a non-latin character. I was pretty sure I had tested it with a random 40 character long ASCII string but apparently I made a mistake somewhere. My bad, thanks for the help, Karol.