snesbitt wrote:
All:

My project requires rmic compilation after compilation. This was fairly
straightforward to add by creating a new rmic method and adding that method
via doLast to the compile and testCompile tasks.

The one thing that was rather awkward was getting the classpath used by the
compile and testCompile tasks respectively. After going through the source I
ended up with the following call:
List classpath =
GUtil.addLists(<task>.classpathConverter.createFileClasspath(project.rootDir,
<task>.unmanagedClasspath),compile.dependencyManager.resolveTask(<task>.name) )

Is there a simpler call?

Not yet.

If not, is there a technical reason why not?

Not really, we just haven't gotten to it yet. I was planning to simplify this stuff as part of the dependency layer refactoring for 0.5 (though I doubt I'll get to it any time soon)

It
seems to me that grabbing the classpath is likely to be a common need and
should be supported by a simple call => compile.getClasspath()


Absolutely

I'll be glad to add a Jira item if this sounds like a reasonable idea.


Yes, please.

I'd offer to provide a patch, but I'm not sure I'm familiar enough with the
architecture/implementation yet to do it right. If someone would point me in the right direction, I will be glad to come up with a patch.


I think you've pretty much described the solution above: extract the classpath building code from Compile.compile() into a public method called Comple.getClasspath().


Adam


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to