当前位置:网站首页>Some exception handling for idea plug-in development

Some exception handling for idea plug-in development

2022-06-27 01:40:00 Gu Jianjie

0. New plug-in project

Official recommendation gradle Way to create

  choice InteliJ Platform Plugin

1.ideaIC Download failed

Development idea Plug in time dependency idea community edition , namely ideaIC As library. It is equivalent to you developing springboot The program requires a variety of spring The same dependence . because idea Official recommendation for plug-in development gradle How to create a project , but gradle Pull it ideaIC Dependency is often pulled unsuccessfully , Therefore, it needs to be downloaded manually ideaIC Dependency and add to local .

https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2021.2.1/ideaIC-2021.2.1.zip

This address indicates ideaIC-2021.2.1 Version depends on , According to what your plug-ins depend on ideaIC The numbers here need to be changed due to different versions . And with your biuld.gradle Match the version in

intellij {
    version = '2021.2.1'
    plugins = ['com.intellij.java']
    updateSinceUntilBuild = false
    sameSinceUntilBuild = false
}

Download it zip package , Put it here gradle Warehouse , If it has not been modified, it is usually in %USER%/.gradle/caches/modules-2/files-2.1

for example ideaIC The path is com/jetbrains/intellij/idea/ideaIC/2021.2.1.

Will download the zip Package calculation hash, use gitbash Tools sha1sum.exe ideaIC-2021.2.1.zip To calculate the hash value , And create this hash Value named folder , then gradle reload Instead of downloading, you can directly use the local cache .

2.gradle build Failure

No value has been specified for property 'compilerClassPathFromMaven' in task ':instrumentCode'

This mistake is due to idea plug-in unit gradle-intellij-plugin Version problem caused , take build.gradle The medium version is reduced to 1.1.3 It can be solved in a moment .

plugins {
    id 'org.jetbrains.intellij' version '1.1.2'
    id 'java'
}

Corresponding issue:No value has been specified for property 'compilerClassPathFromMaven' in task ':instrumentCode' · Issue #752 · JetBrains/gradle-intellij-plugin · GitHub

原网站

版权声明
本文为[Gu Jianjie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270121002001.html