Intellij IDEA 2021.3 开发插件
Intellij IDEA 2021.3 开发插件
注意JDK版本最低要11
01) 使用Jetbrains的github模板 intellij-platform-plugin-template
https://github.com/JetBrains/intellij-platform-plugin-template
a) 有github账号的可以看到这个绿色的按钮,
b) 没有github账号的可以直接使用官方这个仓库克隆
01-2) 处理报错
A problem occurred configuring root project 'goland-gorm-plugin'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6. Required by: project : > org.jetbrains.intellij:org.jetbrains.intellij.gradle.plugin:1.1.6 > No matching variant of org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.2' but: - Variant 'apiElements' capability org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.2') - Variant 'runtimeElements' capability org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.1.6 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.2') * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ****
原因是 intellij 2020版本之后 需要使用jdk 11
在Build Tools里把Gradle gradle jvm:设置成 jdk11 编译就通过
其他参考: https://youtrack.jetbrains.com/issue/GO-11689
About gradle build plugin project generated from intellij-platform-plugin-template
02)xxxx
03)xxx