diff options
author | Xavier Ducrohet <xav@google.com> | 2013-08-21 18:24:28 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-08-21 18:24:28 +0000 |
commit | 4ce884fce3233d90e600d8ad8b598e788dd17e48 (patch) | |
tree | 63f7ecb63ddf5f41e4963f1469039fa4f576da54 | |
parent | 5c9cde6dfb1e114cc13f3258b8ee04edb53f0d7b (diff) | |
parent | 965a9dc0bb0ebd72d3d63e6a93405634b0b4afb6 (diff) | |
download | sdk-4ce884fce3233d90e600d8ad8b598e788dd17e48.zip sdk-4ce884fce3233d90e600d8ad8b598e788dd17e48.tar.gz sdk-4ce884fce3233d90e600d8ad8b598e788dd17e48.tar.bz2 |
Merge "Fix issue with gradle export."
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java index baa6b47..096b0b1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java @@ -132,12 +132,18 @@ public class BuildFileCreator { IPath workspaceLocation = workspaceRoot.getLocation(); IPath relativePath = commonRoot.makeRelativeTo(workspaceLocation); + // if makeRelativePath to returns the same path, then commonRoot is not in the + // workspace. boolean rootInWorkspace = !relativePath.equals(commonRoot); + // we only care if the root is a workspace project. if it's the workspace folder itself, + // then the files won't be handled by the workspace. + rootInWorkspace = rootInWorkspace && relativePath.segmentCount() > 0; File settingsFile = new File(commonRoot.toFile(), SETTINGS_FILE); // more than one modules -> generate settings.gradle if (multiModules && rootInWorkspace) { + // Locate the settings.gradle file and add it to the changed files list IPath settingsGradle = Path.fromOSString(settingsFile.getAbsolutePath()); |