Hmmm...I wonder why it's not a problem for you guys. My build.gradle
looks just like the example...
ideaProject {
javaVersion = '1.6'
withXml { root ->
root.component.find { i...@name == 'VcsDirectoryMappings'
}.mappi...@vcs = 'hg4idea'
}
}
An example dependency path in my generated iml file looks like this:
<root
url="jar://$MODULE_DIR$/../../Users/dtanner/.gradle/cache/javax.activation/activation/sources/activation-1.1-sources.jar!/"/>
Having the username in the path is a problem in a team environment if
we store the .ipr and .iml files in source control. Looking at the
code, it's creating a relative path to the .gradle cache directory,
which is set to project.gradle.gradleUserHomeDir + '/cache', and it
doesn't appear to be configurable.
I tried a couple things with post-processing the xml, but I hit some
snags. e.g. Here were some ideas I kicked around.
whenConfigured { module ->
module.dependencies.classes.each { path ->
// replace the path with a value that uses a team-shared
IDEA-defined variable
}
}
OR...
withXml { root ->
def urlAttributes = root.depthFirst().'@url'
urlAttributes.each { a ->
if (a?.contains('$MODULE_DIR$/../../${user.home}')) {
// replace a with a value that uses a
team-shared IDEA-defined variable
}
}
}
So before I go further down this path...am I making this harder than
it needs to be? i.e. What's different about your situations that's
it's not a problem for others? Thanks again for your help guys.
On Thu, Jul 15, 2010 at 7:38 PM, John Murph <[email protected]> wrote:
> It's not that you are both slow (or maybe I'm slow as well!). Rather, Hans
> is not a native English speaker (although he speaks it very clearly!) and
> therefore sometimes describes things is a slightly confusing way. I should
> have mentioned it when I first saw this section, because I still don't
> understand it either. But I didn't need the feature so I just ignored it
> (and assumed I was a bit slow).
>
>
> On Thu, Jul 15, 2010 at 5:46 PM, David Rosell <[email protected]> wrote:
>>
>> ideaProject {
>> withXml { root ->
>> root.component.find { i...@name == 'VcsDirectoryMappings'
>> }.mappi...@vcs = 'Git'
>> }
>> }
>
> There needs to be a domain object for the VCS settings. I need it as well.
>
>
> --
> John Murph
> Automated Logic Research Team
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email