Russel Winder wrote:
On Sat, 2009-03-14 at 08:16 +1100, Adam Murdoch wrote:
[ . . . ]
This would be useful. Even more useful, from my point of view, would be
if Gradle auto-detected the various JREs and JDKs on the user's system
(as best we can) and made them available to the build.
On Debian/Ubuntu, Solaris and Mac OS X (probably also RHEL/CentOS,
Fedora, SuSE -- no idea about Windows) this is relatively
straightforward as there is a convention as to where package managers
put things. Searching for JREs and JDKs is therefore a solvable problem
-- albeit on a platform by platform basis.
To me, it seems quite reasonable that our JDK (or c compiler, or app
server, or whatever) detection capabilities vary by platform.
Also interesting would be to make it possible to run the build for a
number of java versions jdk15/jdk16/..., would make sense to add a
synthetic subgroup inside a project e.g.: projectA/jdk15/test so it is
easy to run taks of the build for a specific jdk version: gradle
jdk15/test. So multiple groups on top of the build tasks and the only
difference is the java dependency.
This is an interesting idea. You could generalise it to running the
build for a set of different 'platforms' where 'platform' could be any
combination of Java, Groovy, app server, c compiler, whatever.
My principal Gant build problem is that I need to build, test and create
distributions of Gant that work with Groovy 1.5.x, 1.6.x and 1.7.x.
This is the exact use case I was thinking of. We should make it
reasonably easy to declare that a certain group of tasks should be
executed for each of a set of platforms. I think it is pretty closely
related to the 'profile' stuff discussed in another email in this
thread. This problem could be thought of as the composition of 3
different profiles, one for each groovy version, into a single build.
Adam