Scalac plugin to detect classpath entries that aren't directly used
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 17 commits ahead of retronym:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Classpath Shrinker

Build Status Maven Central

The Classpath Shrinker is a scalac plugin to detect unused classpath entries. It was originally created by Jason Zaugg as a better alternative to a commit which fulfilled the same functionality but required the instrumentation of symbol initializers.

This plugin is now maintained by the Scala Center.

The creation of this plugin was motivated by SCP-009: Improve direct dependency experience, and complements the improvements to stub error messages available in 2.12.2 and 2.11.9.

If you use Pants or Bazel, you may find this compiler plugin useful.

Add to your project

resolvers += Resolver.bintrayRepo("scalacenter", "releases")
addCompilerPlugin("ch.epfl.scala" %% "classpath-shrinker" % "0.1.1")

Once it's added, it will report if there are unused classpath entries automatically.

Output looks like:

[info] Compiling 1 Scala source to /drone/src/
[warn] Detected the following unused classpath entries: 
[warn] /.coursier-cache/https/
[warn] one warning found