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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -