Search code examples
androidlinuxgitgradlenightly-build

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?


Solution

  • 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