Katy Lin
Katy Lin

Reputation: 3

How to do a nightly build using Gradle?

I can build my android project in command line with ./gradlew assembleDebug but how do I automate this so Gradle builds itself once every day? Is there any way to do this without downloading something additional like Jenkins?

Upvotes: 0

Views: 260

Answers (2)

Guardian
Guardian

Reputation: 393

Use can use crontab to automate without downloading any package type crontab -e

*     *     *     *     *  Command to be executed
  1. Min (0 - 59)
  2. Hour (0 - 23)
  3. Day of month (1 - 31)
  4. Month (1 - 12)
  5. Day of week (0-7)

lets say if you want to automate everyday around 22:00

0 21 * * * ./gradlew assembleDebug

Upvotes: 0

Paul Sturm
Paul Sturm

Reputation: 2138

If you're on Linux and can do it from the command line, you should look into CRON. That's built into every Linux install I've ever seen.

Upvotes: 0

Related Questions