Hi Alex, can't you just get BasicGradleProject instance (from GradleBuild) and call its http://www.gradle.org/docs/current/javadoc/org/gradle/tooling/model/gradle/BasicGradleProject.html#getProjectDirectory()?
-Radim On Thu, Mar 13, 2014 at 10:57 PM, Alex Ruiz <alr...@google.com> wrote: > Greetings, > > We have discovered a serious bug in Android Studio (and IDEA.) When > importing a Gradle project, IDEA tries to find the root directory of the > Gradle project this way: > > 1. gets the GradleScript from the GradleProject > 2. if GradleScript.getSourceFile() is not null, it assumes the parent > java.io.File of the build.gradle file is the root directory of the > GradleProject > 3. otherwise, it "deduces" the physical path from the logical path > (GradleProject#getPath()) > > This is completely broken for Gradle projects that do not have a > build.gradle file and GradleProject#getPath is not the same as the path in > the file system. For example: > > include ':app' > project(':app').projectDir = new File(rootDir, 'test/app') > > Can you please expose the project's physical path in GradleProject? That > would make it really easy to solve the issue in IDEA. It would be great to > have this in 1.12 :-) > > Many thanks, > -Alex > >