Content for gradle

I am trying to make a small project with Gradle to get to know him. I have a lot of Maven experience, so the basics seem obvious.

However, I am having problems with the tools. My questions is: is there a suitable Content Assist for .gradle files for Eclipse?

I tried STS, which claims to have Gradle support, but when I create a new Gradle project, I got a NoClassDefFoundError. So I installed the Gradle plugin, I also installed Groovy (after several unsuccessful attempts, I found the right version), and now I have a coloring, but without content. I also tried buildship - the same thing. STS seems to have “Enable DSL” for Gradle in a previous version (2.9), but this option is no longer available or I cannot find it.

In short - I tried several options, and none of them suggested a way to learn Gradle syntax, for example, an XML editor that supports XSD for Maven.

+5
source share
2 answers

My questions is: is there a suitable Content Assist for .gradle files for Eclipse?

The short answer is no. As far as I know, there is nothing.

The new BuildShip plugin does not provide editor support, and as far as I know, they have no plans in the near future to work on this.

Plugin

STS gradle had the option “Enable DSL support”, as you mentioned, but this option was removed because it was very limited in what it could actually do, and at the same time was a bit of a nightmare for maintenance.

Groovy Eclipse plugins provide some support for working with common .groovy code, but:

  • no specific gradle support
  • does not work with .gradle files, because it depends on the path to the project class, which does not match the classpath for building the script
  • no longer supported by anyone.

There is one plugin that you can try. minimalist gradle editor . I have not tried this myself, and I don’t think it helps in the content, but this might be your best bet in getting a bit of support for editing .gradle files.

+2
source

I know this question is old and I'm a bit late, but I came across this StackOverflow question while searching on Google. Now there is an Eclipse plugin that supports content support, tooltips, error handling analysis, etc. It is called EGradle. The version I downloaded is 1.3.0, and as far as I know, it supports Eclipse Neon and higher. Hope this helps anyone who can stay here in the future ...

+4
source

Source: https://habr.com/ru/post/1239222/


All Articles