Created
February 15, 2011 16:05
-
-
Save weberste/827705 to your computer and use it in GitHub Desktop.
Unzip source JARs to simplify browsing in text editors.
This file contains hidden or 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
trait SourceExtractor { | |
self: BasicScalaProject => | |
def srcManagedDir = info.projectPath / "src_managed" | |
def scalaPaths = info.projectPath / "project" / "boot" / ("scala-" + crossScalaVersionString) ** "*-src.jar" | |
def libPaths = (managedDependencyPath ** "*-sources.jar") | |
lazy val sources = sourcesAction | |
def sourcesAction = task { | |
FileUtilities.clean(srcManagedDir, log) | |
(libPaths +++ scalaPaths).get.foreach { libPath: Path => | |
FileUtilities.unzip(libPath, srcManagedDir, log) | |
} | |
None | |
} describedAs ("Extracts all the source JARs to make it easily browsable from an editor.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment