=plugin migrate FastClasspathScanner to ClassGraph (#25797)
This commit is contained in:
parent
23b7f86a06
commit
1b6d185f83
2 changed files with 8 additions and 5 deletions
|
|
@ -6,7 +6,6 @@ package akka
|
|||
|
||||
import java.io.{File, FileNotFoundException}
|
||||
|
||||
import _root_.io.github.lukehutch.fastclasspathscanner.FastClasspathScanner
|
||||
import com.lightbend.paradox.markdown._
|
||||
import com.lightbend.paradox.sbt.ParadoxPlugin.autoImport._
|
||||
import org.pegdown.Printer
|
||||
|
|
@ -15,7 +14,6 @@ import sbt.Keys._
|
|||
import sbt._
|
||||
|
||||
import scala.io.{Codec, Source}
|
||||
|
||||
import scala.collection.JavaConverters._
|
||||
|
||||
object ParadoxSupport {
|
||||
|
|
@ -24,8 +22,13 @@ object ParadoxSupport {
|
|||
val log = streams.value.log
|
||||
val classpath = (fullClasspath in Compile).value.files.map(_.toURI.toURL).toArray
|
||||
val classloader = new java.net.URLClassLoader(classpath, this.getClass().getClassLoader())
|
||||
lazy val scanner = new FastClasspathScanner("akka").addClassLoader(classloader).scan()
|
||||
val allClasses = scanner.getNamesOfAllClasses.asScala.toVector
|
||||
import _root_.io.github.classgraph.ClassGraph
|
||||
lazy val scanner = new ClassGraph()
|
||||
.whitelistPackages("akka")
|
||||
.verbose()
|
||||
.addClassLoader(classloader)
|
||||
.scan()
|
||||
val allClasses = scanner.getAllClasses.getNames.asScala.toVector
|
||||
Def.task { Seq(
|
||||
{ context: Writer.Context ⇒
|
||||
new SignatureDirective(context.location.tree.label, context.properties, msg ⇒ log.warn(msg))
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.1") // for advan
|
|||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.0.0") // for maintenance of copyright file header
|
||||
|
||||
// used for @unidoc directive
|
||||
libraryDependencies += "io.github.lukehutch" % "fast-classpath-scanner" % "2.12.3"
|
||||
libraryDependencies += "io.github.classgraph" % "classgraph" % "4.2.12"
|
||||
Loading…
Add table
Add a link
Reference in a new issue