Looking at how to tell gradle to download all the source jars and How can I force gradle to redownload dependencies?, I wonder is there a way to tell gradle to download all the source jars from command line (without touching .gradle
files)
Asked
Active
Viewed 2,236 times
3

Community
- 1
- 1

Paul Verest
- 60,022
- 51
- 208
- 332
1 Answers
1
To download/copy jars and pom files to a folder see this gist
To download/copy sources too see this answer (this could be adapted to include javadocs too)
If you don't want to edit the build.gradle
you can use an init-script to add a task to each project.
Eg dependency-download.gradle
allprojects { Project p ->
p.tasks.add('downloadDependencies', DownloadDependenciesTask)
} as Action<Project>
class DownloadDependenciesTask extends DefaultTask
// TODO implement
}
Then from command line
gradle --init-script dependency-download.gradle downloadDependencies

Community
- 1
- 1

lance-java
- 25,497
- 4
- 59
- 101