Being a little slow myself, I mulled over that section as well. I ended up
ignoring it and every thing worked out fine anyway, with relative path's to
the local gradle repository.
Though there are an open issue for the relative path resolution if you have
your code on a different disk from gradle...
Anyway here is an example build file from one of my projects:

buildscript {
    repositories {
        mavenRepo urls: 'http://gradle.artifactoryonline.com/gradle/plugins'
    }
    dependencies {
        classpath "org.gradle.plugins:gradle-idea-plugin:0.2"
    }
}

apply plugin: 'org.gradle.idea'

ideaProject {
    withXml { root ->
        root.component.find { i...@name == 'VcsDirectoryMappings'
}.mappi...@vcs = 'Git'
    }
}

apply plugin: 'java'

defaultTasks 'build'

repositories {
  mavenCentral()
}

dependencies {
    compile 'org.springframework:spring-core:3.0.3.RELEASE'
    compile 'org.springframework:spring-beans:3.0.3.RELEASE'
    compile 'org.springframework:spring-tx:3.0.3.RELEASE'
    compile 'org.springframework:spring-orm:3.0.3.RELEASE'
    compile 'org.springframework:spring-context:3.0.3.RELEASE'
    compile 'javax.persistence:persistence-api:1.0'
    compile 'org.hibernate:hibernate-entitymanager:3.4.0.GA'
    compile 'commons-lang:commons-lang:2.4'

    compile 'org.springframework:spring-test:3.0.3.RELEASE'
    compile 'org.mockito:mockito-all:1.8.5'
    compile 'hsqldb:hsqldb:1.7.3.3'
    compile 'junit:junit:4.7'
    compile 'log4j:log4j:1.2.14'
    compile 'org.slf4j:slf4j-api:1.5.8'
    compile 'org.slf4j:slf4j-log4j12:1.5.8'
}

The first two sections are the idea part, the third is a mod for setting the
VSC to Git in idea and the rest is the normal build.

Regards,
David

2010/7/14 Dan Tanner <[email protected]>

> Hi guys,
>
> I'm trying to make the ideaModule task in the idea plugin generate the
> module dependencies using a relative path instead of an absolute path.
>  I'm reading section 28.4 in the user guide where it discusses this,
> but I'm kinda slow.
>
> Specifically, where it says "If you use such a path variable, you need
> to tell the ideaModule task the name of this variable, so that it can
> do a proper merge without creating duplicates."
>
> My question is, how do I tell the ideaModule task the name of this
> variable?   Is there an example on this somewhere?  I'm familiar with
> how to create the variable in IDEA, just not familiar with how to
> configure build.gradle for this.
>
> Thanks,
> Dan
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to