I am having issues with grgit plugin for gradle.
This is what I have in my build.gradle
file:
plugins {
id "org.ajoberstar.grgit" version "3.0.0-beta.1"
id 'java-gradle-plugin'
}
apply from: 'path/to/my/otherFile.gradle
Now in my otherFile.gradle
I would like to use Grgit like so:
import org.ajoberstar.grgit.Grgit
task cloneSomeRepo {
doLast {
def grgit = Grgit.clone(dir: "$buildDir/my-repo", uri: "https://mygitserver.com/repo/gitrepo.git")
println grgit.describe()
}
}
And in this file I am getting an error saying:
Could not get unknown property 'Grgit' for root project 'test' of type org.gradle.api.Project.
I am new to gradle, and I might not have understood how this should work, and any help Is very appreciated!