./gradlew idea to create the IDEA project files and download the dependencies required to build Gradle.gradle.ipr project in IDEA.buildSrc project:
./gradlew -u -p buildSrc ideaNow 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.
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:
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.Project
import org.gradle.api.internal.project.DefaultProject
import org.gradle.util.HelperUtil
class MyPlugin extends JavaPlugin {
public void configureDependencyManager(Project project) {
super.configureDependencyManager(project)
project.dependencies {
dependencyFactory.dependencyImplementations << org.gradle.api.dependencies.ModuleDependency
}
}
}
DefaultProject project = HelperUtil.createRootProject(new File('root'))
new MyPlugin().configureDependencyManager(project)
|
With Groovy 1.5.5 this leads for example to an exception, pointing to a Groovy bug.