Skip to content

Commit b59d6a4

Browse files
committed
Set "-Xdoclint:none" only when the Java is 1.8 or more
1 parent 259af32 commit b59d6a4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

project/Build.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ object Build extends Build {
5959
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked", "-target:jvm-1.6", "-feature"),
6060
javaOptions in Test ++= Seq("-ea"),
6161
javacOptions in (Compile, compile) ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation", "-source", "1.6", "-target", "1.6"),
62-
javacOptions in doc := Seq("-source", "1.6", "-Xdoclint:none"),
62+
javacOptions in doc := {
63+
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))
68+
opts ++ Seq("-Xdoclint:none")
69+
else
70+
opts
71+
},
6372
findbugsReportType := Some(ReportType.FancyHtml),
6473
findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html"),
6574
pomExtra := {

0 commit comments

Comments
 (0)