gradle and intellij plugin
Following the tutorial here:
http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html
to get a do-nothing, no code, skeletal plugin project started in the IDE (both Community and Ultimate)
results in the following:
1) Despite Gradle 5.21 being on my machine and pointed to in settings, IJ still downloads it in .zip form. Not a problem specifically, just seems a like waste of bandwidth and time from what I understand.
2) Gradle build never ends. It just builds and builds forever.
2 above is a problem. I thought it was an issue with Gradle but after trying everything I can find by Googling the issue (Gradle build hangs etc etc etc) nothing changes. It just build forever and never returns.
Tried downloading *some file* ppl said Linux needs (details on demand- it's the number #1 answer when Googling this issue w "Linux"
Tried invalidating the cache and restarting w and w/o deleting the offending project on disk.
Tried a bunch of other stuff I won't list. Basically if it seemed like a reasonable thing to try I tried it. Nothing changes.
I have available the entire project / IJ config / IJ logs / machine config involved in this is if anyone thinks that information would be useful.
Below are the basics:
Any ideas are much appreciated.
IntelliJ IDEA 2019.3.1 (Ultimate Edition)
Build #IU-193.5662.53, built on December 18, 2019
Licensed to IntelliJ IDEA Evaluator
Expiration date: February 4, 2020
Runtime version: 11.0.5+10-b520.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.3.0-24-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry:
Non-Bundled Plugins:
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-24-generic
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8350 Eight-Core Processor
Memory: 31.3 GiB of RAM
请先登录再写评论。
>Despite Gradle 5.21 being on my machine and pointed to in settings, IJ still downloads it in .zip form.
When Gradle wrapper is used for the 1st time - IDE downloads (only once) certain gradle version for itself to run the Gradle. It is not possible to configure the Gradle wrapper version yet. See https://youtrack.jetbrains.com/issue/IDEA-177325. See also https://youtrack.jetbrains.com/issue/IDEA-120260#focus=streamItem-27-669189-0-0.
>Gradle build never ends. It just builds and builds forever.
What exactly do you see at this point? How long did you wait? Have you tried - does it work if you build by Gradle from command line? Do you have this problem only with Gradle IDE plugin project type or any Gradle project?
Note that first time Gradle builds the plugin project it must download IDE distribution that could take some time.
If issue remains, please provide idea.log (Help | Show Log in ... action) file after IDE restart and reproducing.
Ahh Ok today it works. Maybe some server between me and some other server was down.... or something.....
The thing is, stuff like this has happened regularly whenever I go to start my Big Plugin Project. Arbitrary things blowing up, not building, random error message, process that run forever *on a no- content, follow-the-instructions dummy project*.
I think for me if I have to reach out onto the vast internet when I want to compile anything at all and that process could fail for reasons no one will ever understand then that's a development process I'm just not interested in. I can't be dependent on the good will of distant resources as a normal part of my development effort. Basically, it puts me at the mercy of the internet or the risk of internet keepers of of resources saying "no" to me for arbitrary reasons or no reasons. Having everything I am trying to, you know, actually work on suddenly become impossible / impossibly frustrating, indeterminate and under the ultimate control of some gatekeeper, human or otherwise, is a non-starter.
If you can figure out a dev env . where I can download something(s) once, however many things there and however big it all is, and I can know what it is I'm downloading and where it's downloaded to (so I can hope to reason about it) and be able to do that by my conscious will and with my full knowledge at a time chosen by me, as I have always done with the JDK and everything else, then I will sign back up. As it is, my experience with this, and not just this time but repeatedly and consistently over literally years now, is basically click n' pray with about a 25/75 pass/fail chance of things working *this time*. I just can't deal with that. YMMV. I quit, but I totally appreciate the offer for help.
Best wishes.
We plan to improve IDE feedback in case of downloading big artifacts during Gradle build/sync: https://youtrack.jetbrains.com/issue/IDEA-229288
@...
This is why I have not moved my plugins to gradle, although it is recommended by JetBrains. I actively monitor the forums for issues with gradle and have yet to get that warm and fuzzy which tells me I am ready to deal with whatever issues I see others encounter.
The other option is to use the old way of doing plugins using DevKit which does take a bit more effort to setup but at least then I have everything under control. Although, it has its PITA issues mainly that all setup for anything off the beaten path is manual setup, which has to be repeated when you want to update IDE version used for debugging.
Setting up test environment took a while to figure out because all plugin dependencies of the plugin under test need to be added to the Intellij Platform Plugin SDK class path. This means clicking the + button in the class path tab and navigating to
pluginsdirectory and selecting the jars comprising the dependency plugin.The above needs to be repeated for each plugin dependency. Luckily, I only have 5.
Other than that I find DevKit plugin development stable and much faster than what I experienced when I tried using gradle.