I’m super new to gradle (basically what I have been able to read today)… and thus I’m sorry if I’m missing something really stupid.
I want to use the project gradle-git from ajoberstar, and wrote this build script.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.8.0'
}
}
now. if i go to the directory and do a
gradle dependencies
it downloads the project. but then does not list it as a dependancy in any of the categories. further more I can’t use it, below if my full code and if you try to run task cloneGitRepo it says it can’t find GitClone. Also the import is all underlined red as intelliJ tells me that cannot resolve symbol ‘ajoberstar’… but I did not know if this was a limitation of the IDE’s integration with gradle or not… but i don’t think it is.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.8.0'
}
}
apply plugin: 'java'
apply plugin: 'maven'
group = 'org.ajoberstar'
description = 'Git plugins for Gradle'
version = '0.8.0'
import org.ajoberstar.gradle.git.tasks.*
task cloneGitRepo(type: GitClone) {
def destination = file("destination_folder")
uri = "your_git_repo_uri"
destinationPath = destination
bare = false
enabled = !destination.exists() //to clone only once
}
I apologize as I’m probably just doing something really stupid or not understanding something simple. Thanks in advanced for any help!