Blog Archives

Gradle snippets: Modularize your scripts

Build files tend to grow in time. New tasks are added, some customizations are made and you end up with several pages of groovy code. Gradle is based on Groovy, so many constructs can be really simplified, but often it’s

Tagged with: , ,
Posted in gradle snippets

Gradle snippets: extract your dependencies

I believe you’ll find this in every gradle project you can download from the net. Since it’s groovy it’s best to just declare a map with your external dependencies in root project. You can then use it in your subprojects

Tagged with: , , ,
Posted in gradle snippets

Gradle snippets: Rename your subprojects’ build files

It’s good to have project separated into modules. It encourages separation of functionalities and simplifies code. Fortunately gradle supports multiple projects very well. Having a project with 2 modules like this: – awesome-project-root — build.gradle — settings.gradle -+ persistence —-

Tagged with: , , ,
Posted in gradle snippets