Sharing scripts and configs between projects

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sharing scripts and configs between projects

Espen Etternavn
Hi,

we have a setup of several gradle projects in separate git repositories. Some of these projects have properties, config files and scripts we would like to share.
So I was wondering if there is a way of sharing this among the different projects. 

Example:

projectX
* build.gradle 
* checkstyle.gradle
* config/checkstyle/checkstyle.xml

The same chekstyle.gradle and config/checkstyle/checkstyle.xml is then needed in another projectX

Is there a way to do this except from rewriting all the share gradle files as plugins?

Regards
Espen


Reply | Threaded
Open this post in threaded view
|

Re: Sharing scripts and configs between projects

Peter Niederwieser
You can share Gradle scripts via HTTP and include them with "apply from: http://...". No need to rewrite anything.

Espen Etternavn wrote
Hi,

we have a setup of several gradle projects in separate git repositories.
Some of these projects have properties, config files and scripts we would
like to share.
So I was wondering if there is a way of sharing this among the different
projects.

Example:

projectX
* build.gradle
* checkstyle.gradle
* config/checkstyle/checkstyle.xml

The same chekstyle.gradle and config/checkstyle/checkstyle.xml is then
needed in another projectX

Is there a way to do this except from rewriting all the share gradle files
as plugins?

Regards
Espen
--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw
Reply | Threaded
Open this post in threaded view
|

Re: Sharing scripts and configs between projects

Philippe Lhoste
On 21/09/2011 09:00, Peter Niederwieser wrote:
> You can share Gradle scripts via HTTP and include them with "apply from:
> http://...". No need to rewrite anything.

Does it need to be http or are other protocols (like file:) available?

Alternatively, you can make a hard links to share the files between projects.
You can even do that in Windows...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --


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

    http://xircles.codehaus.org/manage_email