sbt-classfinder alternatives and similar packages
Based on the "Sbt plugins" category.
Alternatively, view sbt-classfinder alternatives based on common mentions on social networks and blogs.
-
sbt-assembly
Deploy über-JARs. Restart processes. (port of codahale/assembly-sbt) -
sbt-dependency-graph
sbt plugin to create a dependency graph for your project -
sbteclipse
Plugin for sbt to create Eclipse project definitions -
sbt-jmh
"Trust no one, bench everything." - sbt plugin for JMH (Java Microbenchmark Harness) -
sbt-revolver
An SBT plugin for dangerously fast development turnaround in Scala -
sbt-updates
sbt plugin that can check Maven and Ivy repositories for dependency updates -
better-monadic-for
Desugaring scala `for` without implicit `withFilter`s -
sbt-pack
A sbt plugin for creating distributable Scala packages. -
sbt-microsites
An sbt plugin to create awesome microsites for your project -
sbt-mima-plugin
A tool for catching binary incompatibility in Scala -
sbt-ensime
Generates .ensime config files for SBT projects http://ensime.org/build_tools/sbt -
sbt-sonatype
A sbt plugin for publishing Scala/Java projects to the Maven central. -
sbt-ci-release
sbt plugin to automate Sonatype releases from GitHub Actions -
sbt-dependency-check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). :rainbow: -
sbt-header
sbt-header is an sbt plugin for creating file headers, e.g. copyright headers -
sbt-play-scalajs
SBT plugin to use Scala.js along with any sbt-web server. -
sbt-api-mappings
An Sbt plugin that fills apiMappings for common Scala libraries. -
sbt-unidoc
sbt plugin to create a unified Scaladoc or Javadoc API document across multiple subprojects. -
sbt-sublime
An sbt plugin for generating Sublime Text projects with library dependencies sources -
sbt pom reader plugin
Translates xml -> awesome. Maven-ish support for sbt. -
sbt-ide-settings
SBT plugin for tweaking various IDE settings -
sbt-scala-js-map
A Sbt plugin that configures source mapping for Scala.js projects hosted on Github -
sbt-versions
Plugin that checks for updated versions of your project's dependencies. -
sbt-hepek
Sbt plugin for rendering Scala objects to files. And more! -
sbt-pantarhei
sbt plugin building and publishing release notes from github pull requests
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of sbt-classfinder or a related project?
README
sbt-classfinder
sbt-classfinder is a SBT plugin for retrieving runtime information about the classes and traits in a project and searching for specific classes according to some criteria, such as their superclasses or annotations. It allows one to modify the behavior and dependencies of other post-compile SBT tasks according to the compiled code or the classpath.
Quick Start
To use sbt-classfinder in an existing SBT project using SBT 0.13.5+, add the following dependency to your project/plugins.sbt
:
addSbtPlugin("net.ruippeixotog" % "sbt-classfinder" % "0.1.2")
Tasks
classFinderClasspath
: determines the classpath to be searched. The scope of the classpath depends on the value of theclassFinderScope
setting;classFinder
: returns aClassFinder
instance containing several utility methods for listing and finding classes in the specified classpath;allClassesInfo
: an utility task for retrieving a stream with the information of all classes.
Settings
classFinderScope
: defines what should and should not be searched in the build classpath. One of:Config
: search the build products of the scoped SBT configuration, e.g.Compile
classes forcompile:classFinderScope
andTest
classes fortest:classFinderScope
;Build
: search the build products of the whole SBT build, including other projects in multi-project builds;BuildAndDeps
: search the full classpath, including external dependencies.
Examples
Run the main class marked with the annotation QuickRun
:
// build.sbt
lazy val markedMain = TaskKey[String]("markedMain")
lazy val runMarked = TaskKey[Unit]("runMarked")
markedMain := {
val className = (classFinder in Compile).value.classesAnnotatedWith("QuickRun").head.name
if (className.endsWith("$")) className.dropRight(1) else className
}
runMarked <<= std.FullInstance.flatten {
markedMain.map { mMain => (runMain in Compile).toTask(" " + mMain) }
}
Make test
run also subclasses of MyTest
using a custom test executor:
// build.sbt
lazy val myTests = TaskKey[Seq[String]]("myTests")
def myTestExecutor(testClass: String) = ???
myTests := (classFinder in Test).value.subtypesOf("MyTest").map(_.name).toSeq
test <<= myTests.map { testSeq => testSeq.map(myTestExecutor) }
Copyright
Copyright (c) 2015 Rui Gonçalves. See LICENSE for details.
*Note that all licence references and agreements mentioned in the sbt-classfinder README section above
are relevant to that project's source code only.