How to write and call methods in gradle script

How to write and call methods in gradle script

As mentioned in our previous post where we discussed about the flow of a gradle custom task, we will now talk about how we can define a custom method inside the gradle script so that we can arrange our coding for a better understanding.

In one approach of writing methods is given below:

Read the rest

How to write a gradle task in your build.gradle to do a custom job

How to write a gradle task in your build.gradle to do a custom job

As you already know, gradle is a project automation tool based on the concepts and methods of  Apache Ant and Apache Maven contains the good aspects of both and it provides a way to implement your own build idea. Unlike ant or maven that uses xml to configure things, gradle uses a groovy based Domain Specific Language (DSL) to write your build logic.

Read the rest