| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
SBT plugin for retrieving Scala modules and libraries dependencies and outputs it as JSON. As an identifier for current dependencies, we use Git commit. In addition, there's an option to upload the current commit project's dependencies to Amazon S3.
In our project, which is mono-repo, we have a lot of services and libraries, and it became hard to follow the module/library dependency graph. There are SBT plugins that can answer this question, but they usually contain a large number of settings and tasks that are not relevant to our needs. We wanted to have a lightweight sbt command to understand our project's module dependencies. With the help of Github API commit diff, we can use this information in order to determine which services were affected by the code change in a commit and deploy only these services. It helps to keep track of module dependencies and library version used in each module.
Add the plugin as SBT dependency to your project/plugins.sbt
addSbtPlugin("com.supersonic" % "sonic-dependency-tree" % "0.0.3")
Since it is an Auto Plugin, no need to explicitly enable it.
If you still wish to do so, you can do it like this:
lazy val root = (project in file("."))
.enablePlugins(SonicDependencyTreePlugin)All Settings and Task are defined as Global and should be defined somewhere in build.sbt but not on individual projects.
For example:
sonicDependenciesS3BasePath in Global := "my-folder"
sonicDependenciesS3Bucket in Global := "dependencies-bucket"
sonicDependenciesUploadFilename in Global := "dependencies.json"You can upload the dependency tree of the project to AWS S3 using this command sbt sonicDependenciesUploadToS3
Reminder: Because the upload task is Global, the settings should be defined using in Global scope. For example:
sonicDependenciesS3BasePath in Global := "my-folder",
sonicDependenciesS3Bucket in Global := "dependencies-bucket",
sonicDependenciesUploadFilename in Global := "dependencies.json"This will upload the file to S3://dependencies-bucket/my-folder/dependencies.json
AWS S3 client library used is com.amazonaws.aws-java-sdk-s3 In case sonicDependenciesS3Credentials is not set, S3 client will use DefaultAWSCredentialsProviderChain, which is the preferred method and do not require to store credentials in build.sbt project definition, also it is more secure.
| Back | FazBrowse Home | New Git URL |