- Install the JetGroovy plugin. Depending on which version of IDEA you are using, it may already be installed.
- Clone the Gradle repository (git://github.com/gradle/gradle.git).
- Change into the top level directory of the repository.
- Run
./gradlew ideato create the IDEA project files and download the dependencies required to build Gradle. - Open the
gradle.iprproject in IDEA. - (optional) Generate the module for the
buildSrcproject:- Run
./gradlew -u -p buildSrc idea - Add the buildSrc.iml module to the project.
- Run
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:
