I want to pull changes from git repo before compilation begins. I found this Gradle: how to clone a git repo in a task?, but it clones the repo instead of fetching just the cha
The following gradle script should be helpful:
import org.ajoberstar.grgit.* buildscript { repositories { mavenCentral() } dependencies { classpath 'org.ajoberstar:gradle-git:1.1.0' } } task pull << { def grgit = Grgit.open(dir: project.file('.')) grgit.pull(rebase: false) }