Skip to content

Commit 6c8d9da

Browse files
committed
Merge pull request msgpack#172 from msgpack/xdoclint_none_on_java18
Set "-Xdoclint:none" only when the Java is 1.8 or more
2 parents 259af32 + 8c165d2 commit 6c8d9da

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

project/Build.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import de.johoop.findbugs4sbt.FindBugs._
2222
import de.johoop.jacoco4sbt._
2323
import JacocoPlugin._
2424
import sbtrelease.ReleasePlugin._
25-
import xerial.sbt.Sonatype._
25+
import scala.util.Properties
26+
2627

2728
object Build extends Build {
2829

@@ -59,7 +60,13 @@ object Build extends Build {
5960
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked", "-target:jvm-1.6", "-feature"),
6061
javaOptions in Test ++= Seq("-ea"),
6162
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"),
63+
javacOptions in doc := {
64+
val opts = Seq("-source", "1.6")
65+
if (Properties.isJavaAtLeast("1.8"))
66+
opts ++ Seq("-Xdoclint:none")
67+
else
68+
opts
69+
},
6370
findbugsReportType := Some(ReportType.FancyHtml),
6471
findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html"),
6572
pomExtra := {

0 commit comments

Comments
 (0)