sbt-trace
is a SBT plugin that can find traces of the client or library in different applications.
It does this by using the GitHub's Search API and locating usage of client or library in the build.sbt
of applications.
Add the following to project/build.properties
:
addSbtPlugin("com.delprks" % "sbt-trace" % "1.0.0")
If you want to define the search scope in the library itself, you can add it to build.sbt
:
val traceSettings = Seq(
traceUser := "delprks"
)
lazy val `project-name`: Project = project.in(file("."))
.enablePlugins(SbtTrace)
.settings(traceSettings)
Or you can define it as an environment variable:
export TRACE_GIT_USER=delprks
If you are using the plugin to search private repositories, you would need to provide a GitHub-generated access token which can retrieve repository information.
You should then export it as an environment variable:
export TRACE_GIT_TOKEN=<token>
You can run the following in client or libraries to find their usage:
sbt trace
Output:
Found 7 traces of rms-sounds-metadata in:
|-rms-deftones
|-rms-nirvana
|-rms-programme-metadata-client
|-rms-green-day
|-rms-sounds-activities-client
|-rms-sounds-metadata-client
|-rms-blur
+-rms-sounds-metadata
sbt-trace
is open source software released under the Apache 2 License.