java - Gradle: How to perform git pull through gradle? -
i want pull changes git repo before compilation begins. found gradle: how clone git repo in task?, clones repo instead of fetching changes. time consuming if git server not on local network or if repo large.
i not find how git pull
using gradle or gradle-git plugin.
you can create exec
task , run shell/cmd command. no plugin dependency required simple tasks.
task gitpull(type: exec) { description 'pulls git.' commandline "git", "pull" }
usage: gradlew gitpull
you should see smth this:
gradlew gitpull parallel execution incubating feature. :app:gitpull up-to-date. build successful total time: 9.232 secs
where already up-to-date.
output git pull
command.
Comments
Post a Comment