Bungles
Bungles

Reputation: 2257

gradle.xml not consistent between platforms

I develop using Android Studio on both Macs and PCs, and am seeing undesired behavior when moving projects between the two platforms.

One of those issues is regarding the "gradleHome" value in '.idea/gradle.xml', which is a correct-looking value on the Mac:

<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.10" />

When I check out the project and load it into Android Studio on Windows, the '.idea/gradle.xml' value for "gradleHome" becomes a hard-coded path:

<option name="gradleHome" value="C:\Program Files\Android Studio\gradle\gradle-2.10" />

Obviously problems will ensue if the file is checked in with a hard-coded path, but there seems nothing I can do but ignore this change during checkin.

Does anyone know why this is happening or how to prevent it? Should I not be checking this file into SVN?

Thanks!

Upvotes: 5

Views: 1692

Answers (1)

ligi
ligi

Reputation: 39539

This file should not be checked into version-control. What can go into version-control and defines the gradle-version is this file: gradle/wrapper/gradle-wrapper.properties - I would ignore the whole .idea directory. On a side node - think about using git over svn - if you really need svn as a storage there is git-svn ..

Upvotes: 5

Related Questions