Skip to end of metadata
Go to start of metadata
  1. Install the JetGroovy plugin. Depending on which version of IDEA you are using, it may already be installed.
  2. Clone the Gradle repository (git://github.com/gradle/gradle.git).
  3. Change into the top level directory of the repository.
  4. Run ./gradlew idea to create the IDEA project files and download the dependencies required to build Gradle.
  5. Open the gradle.ipr project in IDEA.
  6. (optional) Generate the module for the buildSrc project:
    • Run ./gradlew -u -p buildSrc idea
    • Add the buildSrc.iml module to the project.

Now you can run and debug any Gradle build from IntelliJ, without having to install Gradle. See How to run the Gradle project in IntelliJ against any Gradle build.

Testing Gradle

To test a certain behavior of Gradle, I have another module with a Groovy facet, which I have called tester within the same IntelliJ project. This module has a dependency on the gradle-core module. Make sure that all the external dependencies of gradle are exported. In tester I can create a Groovy script which looks for example like this:

With Groovy 1.5.5 this leads for example to an exception, pointing to a Groovy bug.

Labels: