0xF
0xF

Reputation: 3698

Call a command-line tool from a Gradle script

I have an Android project where some Java source files are auto-generated using a command-line tool.

How can I include this command in my Gradle script so that it is executed when I build my application?

Upvotes: 0

Views: 119

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317362

You can use Gradle's Exec task to specify a program and its arguments. Then insert the task as a dependency of the task that requires the program to have been run.

Upvotes: 2

Related Questions