The Git dependencies plugin helps resolving Gradle project dependencies via git using seamless gradle syntax.
It relies on Gradle multi-project build capabilities. The purpose of this plugin is to setup a multi-project Gradle environment ONLY when
a dependency cannot be resolved via the classical maven or ivy Gradle Dependency Resolution.
What's this ?
If you sometime need to convert some external module dependency to project dependency then this plugin is for you !
Just specify your git repo where the plugin can find your dependency.
The git-dependencies plugin adds 3 tasks to your project:
initGitDependencies
resolveGitDependencies
refreshGitDependencies
initGitDependencies task
This task will look for dependency that cannot be resolved but have a git extra property. It will clone them into project.gitDependenciesDir, default to "${projectDir.parent}/${project.name}-git-dependencies"
and prepare your environment for a multi-project build by adding '''settings.gradle''' in "${projectDir.parent}
resolveGitDependencies task
This task will always be called after your project evaluation, it is simply replacing any unresolved git dependencies by a project dependency using the cloned repositories.
refreshGitDependencies task
This task simply refresh all cloned repository
Usage
To use the git-dependencies plugin, include in your build script:
请发表评论