Who wants to take a stab at Gradle integration in Forge?<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Jason Porter</b> <span dir="ltr">&lt;<a href="http://lightguard.jp">lightguard.jp</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span><br>
Date: Wed, May 4, 2011 at 12:03 PM<br>Subject: Fwd: [gradle-user] tooling api<br>To: <a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a><br><br><br>Adam has done a good job of describing what the Tooling API is.<br>

Certainly something to look into for forge.<br>
<br>
---------- Forwarded message ----------<br>
From: Adam Murdoch<br>
Date: Sunday, May 1, 2011<br>
Subject: [gradle-user] tooling api<br>
To: <a href="mailto:user@gradle.codehaus.org">user@gradle.codehaus.org</a><br>
<br>
<br>
Hi,<br>
The 1.0-milestone-3 release includes a new API, called the tooling<br>
API, which you can use for embedding Gradle. This API allows you to<br>
execute and monitor builds, and to query Gradle about the details of a<br>
build. It does so in a version independent way, so that you can use<br>
the same API to work with different versions of Gradle. The main<br>
audience for this API is IDE, CI server, and other UI authors.<br>
However, it is open for anyone who needs to embed Gradle in their<br>
application.<br>
So, what does this API give you? Here are some features:<br>
* You can query Gradle for the details of a build, including the<br>
project hierarchy and the project dependencies, external dependencies<br>
(including source and javadoc jars), source directories and tasks of<br>
each project.<br>
* You can execute a build, and listen to stdout and stderr logging and<br>
progress (ie the stuff shown in the &#39;status bar&#39; when you run on the<br>
command line).<br>
* Gradle wrapper aware and, by default, uses the same Gradle version<br>
as that used when you run on the command-line.<br>
* Downloads and installs the appropriate Gradle version, similar to the wrapper.<br>
* Lightweight implementation, with only a small number of<br>
dependencies. It is also a well-behaved library, and makes no<br>
assumptions about your classloader structure or logging configuration.<br>
This makes the API easy to bundle in your application.<br>
* Integrated with the daemon, and will use it where appropriate, for<br>
fast builds which don&#39;t pollute the JVM which your application is<br>
running in.<br>
We plan to add a bunch more UI and IDE friendly features. Some examples:<br>
* Performance. The API gives us the opportunity to do lots of caching,<br>
static analysis and preemptive work, to make things faster for the<br>
user. Given that this is the first cut of the API, the implementation<br>
does not take advantage of this yet.<br>
* Better progress monitoring and build cancellation. For example,<br>
allowing test execution to be monitored.<br>
* Notifications when things in the build change, so that UIs and<br>
models can be updated.<br>
* Validating and prompting for user supplied configuration.<br>
* Prompting for and managing user credentials.<br>
This API is now the official and recommended way to embed Gradle. This<br>
means that the existing APIs, namely GradleLauncher and the open API<br>
(UIFactory and friends), are now deprecated and will be removed in<br>
future versions of Gradle. This will almost certainly happen before<br>
Gradle 1.0 is released. And for the GradleLauncher API, this might<br>
happen before the next milestone.<br>
If you happen to use one of the above APIs, please consider changing<br>
your application to use the tooling API instead.<br>
You can find some samples in $gradleHome/samples/toolingApi. The build<br>
files for these samples show the appropriate repository configuration<br>
and dependency declarations you&#39;ll need in order to use it.  See also<br>
the Javadoc for GradleConnector, which is the main entry point of the<br>
API: <a href="http://gradle.org/current/docs/javadoc/org/gradle/tooling/GradleConnector.html" target="_blank">http://gradle.org/current/docs/javadoc/org/gradle/tooling/GradleConnector.html</a><br>
The tooling API currently supports only Gradle 1.0-milestone-3. It<br>
will also support any future releases of Gradle. At this stage, we are<br>
not planning to add any support for older Gradle releases. That is,<br>
you won&#39;t be able to use the tooling API to execute a build that needs<br>
Gradle 0.9, for example. However, if there&#39;s a convincing reason, we<br>
can look at adding support for some earlier Gradle releases.<br>
<br>
<br>
--Adam Murdoch<br>
Gradle Co-founder<br>
<a href="http://www.gradle.org" target="_blank">http://www.gradle.org</a><br>
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting<br>
<a href="http://www.gradleware.com" target="_blank">http://www.gradleware.com</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Jason Porter<br>
<a href="http://lightguard-jp.blogspot.com" target="_blank">http://lightguard-jp.blogspot.com</a><br>
<a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br>
<br>
Software Engineer<br>
Open Source Advocate<br>
Author of Seam Catch - Next Generation Java Exception Handling<br>
<br>
PGP key id: 926CCFF5<br>
PGP key available at: <a href="http://keyserver.net" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
</div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>