Hi,

generally I'd agree with Magnus. You can use your own model for this
purpose. There is at least one big advantage to this: your model can work
with older Gradle releases. I think if we add this to GradleProject we
won't be able to adapt instances obtained from older providers to give you
that information.

I'd like to see that information available for example to implement
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-queries/org/netbeans/spi/queries/SharabilityQueryImplementation.html
in NetBeans plugin). Adding this to BasicGradleProject can be OK. It seems
simple enough and we want to keep its related model ligthweight.

Some other comments below.

On Tue, Jun 10, 2014 at 4:37 PM, Alex Ruiz <alr...@google.com> wrote:

> Greetings,
>
> We recently discovered a bug in Android Studio we need to "unexclude" (in
> IDEA terminology) some folders inside the "buildDir" folder in the
> top-level project. The problem is that the Gradle model APIs do not expose
> the location of "buildDir".
>
> I am not sure why you need to do this. Can you be more specific?


> Would it be possible to add "getBuildDir"
> to org.gradle.tooling.model.GradleProject for Gradle 2.0? pretty please?
> :-) Having this information will solve this and another related issues
> (that we discovered a few days ago.)
>
> Or is there another way to obtain this information?
>
> I'm so sorry for the last-minute request, we were obtaining this
> information from an IDEA model, but it seems that this is not reliable,
> according to user reports.
>

http://www.gradle.org/docs/release-candidate/javadoc/org/gradle/tooling/model/idea/IdeaModule.html#getCompilerOutput()
doesn't return $project.buildDir It only returns values that can be
customized as shown in
http://www.gradle.org/docs/release-candidate/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html
It means if you want to know where are classes compiled by IDEA stored it
can be better to query IDEA project APIs directly. If you need to know
where Gradle puts output files you need this API.

Perhaps if you can point us to your bug reports we can find some good way
how to solve this.

-Radim

>
> Many thanks,
> -Alex
>

Reply via email to