Building plugin through the Gradle Workflow
Dear all,
I am developing background plugin for IDEA 2019.2.
Following the documentation Building plugins with Gradle.
Also as a reference using the examples of plugins.
When I am ruining runIde task through the Gradle tasks my background plugin works.
When building plugin jar (ruining buildPlugin) to installed through the Settings -> Plugin section plugin not works.
Developing plugin through the DevKit working fine for the same plugin and also for DevKit we have Deploy Plugin documentation.
My plugin configurations:
plugin.xml
<idea-plugin>
<id>com.metaring.platform-plugin-idea</id>
<name>MetaRing Plugin for IntelliJ Idea IDE</name>
<description>MetaRing Code Generation Plugin. For more information please visit to our web site</description>
<vendor email="info@metaring.com" url="http://www.metaring.com">MetaRing s.r.l.</vendor>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.lang</depends>
<extensions defaultExtensionNs="com.intellij">
<postStartupActivity implementation="com.metaring.plugin.idea.activity.MetaRingPostStartupActivity"/>
</extensions>
</idea-plugin>
MetaRingPostStartupActivity.java
.......
.......
.......
public class MetaRingPostStartupActivity implements StartupActivity {
@Override
public void runActivity(@NotNull Project project) {
System.out.println("Hello World");
}
}
build.gradle
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.9'
}
group 'com.metaring'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.metaring', name: 'platform-ide-plugin', version: '1.0.7'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.2'
}
Questions:
0. Should I have some miss configuration ?
1. Should I am restricted to install plugin as a jar manually, if I am developing plugin through the Gradle workflow ?
2. Do you have any Deploy Plugin instructions for Gradle Workflow case ?
3. Should I have to have zip instead of jar plugin, if have external libraries as mentioned in documentation ?
NOTE: I have another question here which is about troubles during buildPlugin task.
Thanks in advance for your reply
请先登录再写评论。
1. no
2. no, simply take the ZIP file that gets build from Gradle
3. You'll need to install a ZIP of your plugin which contains all necessary 3rd party libraries.
See https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/deploying_plugin.html:
Yes, thanks did the stuff before like that. Thought that missed something.
Thanks Yann