-
-
Save samueltardieu/924051 to your computer and use it in GitHub Desktop.
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
// Use with a default value as in: | |
// runningScalaVersion getOrElse "2.8.0" | |
lazy val runningScalaVersion = { | |
val matcher = """version (\d+\.\d+\.\d+).*""".r | |
util.Properties.versionString match { | |
case matcher(vsn) => Some(vsn) | |
case _ => None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment