I think everything minus the withXml section and javaVersion are in
the current rc-1 version that ships with Gradle, you don't need to
manually add it to the classpath any longer.

On Thu, Aug 12, 2010 at 09:30, Dan Tanner <[email protected]> wrote:
> Hi guys,
> Just sharing the IDEA project generation section of my build.gradle
> for others.  It builds on the documentation, adding settings that all
> our developers use for a given project.
>
> Specifically, this shows how to:
> - specify the JDK (named "1.6" in this case)
> - set the GRADLE_HOME variable for the project, as used by IDEA. This
> is needed for the Gradle GUI plugin.
> - exclude the build and .gradle directories in IDEA.
>
> Improvement suggestions are welcome. e.g. the way I added the
> GradleSettings node to the root seems clunky, but I didn't see an easy
> way to make it more MarkupBuilder-ish.  HTH.
>
>
> // IDEA project file generation configuration
> buildscript {
>     repositories {
>         mavenRepo urls: 'http://gradle.artifactoryonline.com/gradle/plugins'
>     }
>     dependencies {
>         classpath "org.gradle.plugins:gradle-idea-plugin:0.3.1"
>     }
> }
>
> ideaProject {
>     javaVersion = '1.6'
>     withXml { root ->
>         root.component.find { i...@name == 'VcsDirectoryMappings'
> }.mappi...@vcs = 'hg4idea'
>         def gradleSettings = new Node(root, 'component',
> [name:'GradleSettings'])
>         def gradleSettingsOption = new Node(gradleSettings, 'option',
> [name:'SDK_HOME', value: System.getenv()['GRADLE_HOME']])
>     }
> }
>
> ideaModule {
>     excludeDirs = [file('./build'), file('./.gradle')]
> }
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to