This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ivy.`io.get-coursier::coursier:2.0.0-RC6-21` | |
import coursier._ | |
import java.io.File | |
import java.io.FileInputStream | |
import scala.concurrent.ExecutionContext | |
def extractMainClassName(file: File): Option[String] = { | |
val jarStream = | |
new java.util.jar.JarInputStream(new FileInputStream(file)) | |
val mf = jarStream.getManifest | |
Option(mf.getMainAttributes).flatMap(attrs => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val pprint2 = | |
pprint.copy( | |
additionalHandlers = { | |
case value: java.nio.file.Path => | |
val v = pprint.Util.literalize(value.toString) | |
pprint.Tree.Apply( | |
"Paths.get", | |
Iterator(v).map(pprint.Tree.Literal.apply) | |
) | |
case value: scala.meta.inputs.Position.Range => |
OlderNewer