Hi Marty,

On Wed, Jan 20, 2010 at 9:10 AM, MartyMcFly <[email protected]>wrote:

>
> Hi all,
>
> we are considering to migrate our current build to Gradle.
>
> We have hundreds of eclipse projects which are build with ant and
> ant4eclipse and our current Build does always a full build of all projects.
>
> The system is nonsatisfying and defective, but for a developer it is easy
> as
> they are not concerned with the build process (all they have to do is put
> their project in the .psf and enter the usual Eclipse dependencies).
>
> To switch to gradle we would need also such an easy handling for the
> developer.
>
> So basically my questions about gradle:
>
> - Is it possible to have a "template" build.gradle, so that not every
> project needs to define its own, identical to other build files. This is
> not
> like the "multi-project build", every project should be build individually,
> but I dont want to have redundant build files ?
>

Yes, this is possible. You have two options:

In the build.gradle of the project you can say:

apply url: '<pathToTemplate>'

Alternatively you could use a multi-project build as Gradle allows for
partial builds. Then you wouldn't even need the apply section in the project
build script.


>
> - How is the integration of Gradle with eclipse ? Is it somehow possible
> for
> the developer to have a plugin with which one can enter / delete
> dependencies and that is then transformed into gradle syntax.
> Basically I want to free the developer to know about Gradle at all.
> E.g. Defining the dependencies in a properties file which is then read by
> the build process or any other way...
>

This would be possible without problems. It just needs to be written :)

For your scenario I could imagine the following strategy. You would write a
plugin that is used in all your builds. This plugin would do two things:

1.) Do what the template build script is supposed to do.
2.) Read the .classpath and configure the Gradle dependency section
according to that.

This plugin could be just another gradle script applied as described above.

You can do stuff in there like:

dependencies {
      compile files(getDependenciesFromEclipse())
}

where getDependenciesFromEclipse returns for example a set of files.

The Groovy Xml API's are fantastic. Using those for parsing the .classpath
files should make implementing this very convenient.

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz



>
> These are essentiell points for considering switching to Gradle, which I
> would love to do...
>
> so I hope someone can solve this concerns.
>
> Thanks - I hope my intensions were clear
> Marty
> --
> View this message in context:
> http://old.nabble.com/Migration-current-build-to-Gradle-tp27238061p27238061.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to