Is there a way to split/factor out common parts of Gradle build

Gradle 0.9 allows you to import a build script from another build script. Have a look at: Configuring the project using an external build script. Basically it’s apply from: 'other.gradle'.

One thing the user guide doesn’t mention is that the ‘from’ parameter can be a URL, so you can make your shared scripts available via HTTP somewhere (eg your subversion repository), and import them from multiple builds.

Leave a Comment