Open mr-thierry opened 2 months ago
The jar
task produces just the first version of Jar fine, which is later still enhanced — with instrumented code or merged with other submodules.
Currently, components["java"]
gives you just the bad Jar file.
What I could do here is introduce a custom intellijPlatform
component you could use with components["intellijPlatform"]
.
The searchable options jar case — this is clearly an issue I have to address.
However, the final plugin Zip archive we publish to JetBrains Marketplace is a bit more than just a jar — or contains also other dependencies, submodules, resources, etc.
What's the exact reason for publishing the plugin to Maven Central?
@hsz I am not publishing to Maven Central. I am publishing to an internal Maven repository (artifactory) to deliver my plugin internally.
Chiming in here too. My plugin has submodules, which one of them contains shared logic that does not produce any searchable options, so the searchable options task fails for those modules, however disabling the searchable options results in this issue too.
My plugin has submodules
Do you apply there org.jetbrains.intellij.platform.module
? This is a limited set of tasks and setups that should be applied to submodules.
Do you apply there org.jetbrains.intellij.platform.module? This is a limited set of tasks and setups that should be applied to submodules.
Ahh, I did not know that... Let me play with that
BTW if you want to publish your plugin to maven central (or any other repo that requires javadoc/sources jar), you also need to include them:
publications.register<MavenPublication>("mavenJava") {
from(components["intellijPlatform"])
artifact(tasks.named("sourcesJar"))
artifact(tasks.named("javadocJar"))
}
What happened?
I have a plugin that needs to be publish to an internal Maven repo. To publish to this repo I'm using the Maven Publish plugin.
I configure my plugin like so:
This is how the Maven Publish plugin is configured:
When I call the task:
It fails with the following error:
I believe the task that generates the JAR files is not properly configured, and as such the Maven Publish plugin cannot find it.
Relevant log output or stack trace
No response
Steps to reproduce
See the description
Gradle IntelliJ Plugin version
2.0.0-beta8
Gradle version
8.8
Operating System
None
Link to build, i.e. failing GitHub Action job
No response