GeezerVison is showing github.com — Refactor: use scala.util.Properties.isJavaAtLeast() · xyygithub/msgpack-java@8c165d2
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: project/Build.scala +3-5Lines changed: 3 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -22,7 +22,8 @@ import de.johoop.findbugs4sbt.FindBugs._ |
22 | 22 | import de.johoop.jacoco4sbt._ |
23 | 23 | import JacocoPlugin._ |
24 | 24 | import sbtrelease.ReleasePlugin._ |
25 | | -import xerial.sbt.Sonatype._ |
| 25 | +import scala.util.Properties |
| 26 | + |
26 | 27 |
|
27 | 28 | object Build extends Build { |
28 | 29 |
|
@@ -61,10 +62,7 @@ object Build extends Build { |
61 | 62 | javacOptions in (Compile, compile) ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation", "-source", "1.6", "-target", "1.6"), |
62 | 63 | javacOptions in doc := { |
63 | 64 | val opts = Seq("-source", "1.6") |
64 | | - val (major, minor) = System.getProperty("java.version").split('.') match { |
65 | | - case Array(major, minor, _) => (major.toInt, minor.toInt) |
66 | | - } |
67 | | - if ((major == 1 && minor >= 8) || (major > 1)) |
| 65 | + if (Properties.isJavaAtLeast("1.8")) |
68 | 66 | opts ++ Seq("-Xdoclint:none") |
69 | 67 | else |
70 | 68 | opts |
|