Tom Eyckmans wrote:
Hi guys,

I think the need for a init script is rising, some functionalities that I think would make sense in the init script:

# Execution Profile (add a new command line parameter for this aswell?)
- define or customize execution profiles: basically set plugin convention values to a value that makes sense for the profile. - state the default execution profile (developer workstation / ci server/ others? )


I'm not sure what this means exactly. What is the use case for this? An example?

# Java Homes - define the java homes that are installed locally and set the default source/target compatibilities for the java home.


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.

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.

# Define default configurations/ repositories / dependencies / publishers


Doesn't this stuff belong in the build file?

# Define template build scripts, basically what we do for multiproject builds with allprojects/subprojects but named so they can be pulled in with something like useTemplate('my-java-layout')


What is the use case for this?

As always, comments other ideas more than welcome.


I think an init script would be a good thing to have. I would start with something simple and general, and optimise for common use cases later. For example, if the init script could receive the BuildListener events, then it could perform pretty much any customisation it wants:

onBuildStarted { StartParameter param ->
   ... do some custom logging configuration ...
}

onProjectsLoaded { Build build ->
   ... register some JDKs ...
   ... set username and password for a particular repository ...
   ... apply some plugin to a project ...
   ... add some custom tasks to a project ...
   ... etc ...
}


Adam


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

   http://xircles.codehaus.org/manage_email


Reply via email to