I want to write an sbt plugin, and inside it I need to get the list of all dependencies of current project (with some info, is possible). Is it possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In our project we use the update task to get the library dependencies:
Hope this helps for a start.
[EDIT] Here is a simple example how to add this functionality to your task:
To use the task just add testSettings to your project.
For more about tasks see the sbt documentation. More information about the update task can be found here.
[EDIT2] The update task only gets the library dependencies. I never tried out external
project dependencies (like to a git repository). Maybe you need something like the following: find project artifacts. The task allTheArtifacts finds the artifacts of the project and the artifacts of its project dependencies.