mirror of https://github.com/sbt/sbt.git
Print consistent version
Java has dropped the leading "1." from the specification version in later versions. No one really refers to java 1.8, so it makes sense to strip the "1." from the suggested version.
This commit is contained in:
parent
4e66b492e5
commit
cd744b2c35
|
|
@ -121,6 +121,7 @@ lazy val sbtRoot: Project = (project in file("."))
|
|||
buildLevelSettings,
|
||||
minimalSettings,
|
||||
onLoadMessage := {
|
||||
val version = sys.props("java.specification.version")
|
||||
""" __ __
|
||||
| _____/ /_ / /_
|
||||
| / ___/ __ \/ __/
|
||||
|
|
@ -128,9 +129,9 @@ lazy val sbtRoot: Project = (project in file("."))
|
|||
| /____/_.___/\__/
|
||||
|Welcome to the build for sbt.
|
||||
|""".stripMargin +
|
||||
(if (sys.props("java.specification.version") != "1.8")
|
||||
(if (version != "1.8")
|
||||
s"""!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
| Java version is ${sys.props("java.specification.version")}. We recommend 1.8.
|
||||
| Java version is $version. We recommend java 8.
|
||||
|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!""".stripMargin
|
||||
else "")
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue