You can create an Exec task and run any shell / cmd command. Simple tasks do not require an additional plugin dependency.
task gitPull(type: Exec) { description 'Pulls git.' commandLine "git", "pull" }
Usage: gradlew gitPull
You should see smth as follows:
gradlew gitPull Parallel execution is an incubating feature. :app:gitPull Already up-to-date. BUILD SUCCESSFUL Total time: 9.232 secs
Where is Already up-to-date. is the result of the git pull command.
source share