mirror of https://github.com/sbt/sbt.git
Allow to disable publishing Javadoc with -Dpublish.javadoc
Useful when testing the plugin locally
This commit is contained in:
parent
3eb210eb1b
commit
5377b537b1
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
import java.util.Locale
|
||||
|
||||
import sbt._
|
||||
import sbt.Keys._
|
||||
import sbt.ScriptedPlugin.autoImport.{scriptedBufferLog, scriptedLaunchOpts}
|
||||
|
|
@ -22,7 +24,16 @@ object Settings {
|
|||
"-language:higherKinds",
|
||||
"-language:implicitConversions"
|
||||
)
|
||||
)
|
||||
) ++ {
|
||||
val prop = sys.props.getOrElse("publish.javadoc", "").toLowerCase(Locale.ROOT)
|
||||
if (prop == "0" || prop == "false")
|
||||
Seq(
|
||||
sources in (Compile, doc) := Seq.empty,
|
||||
publishArtifact in (Compile, packageDoc) := false
|
||||
)
|
||||
else
|
||||
Nil
|
||||
}
|
||||
|
||||
lazy val plugin =
|
||||
shared ++
|
||||
|
|
|
|||
Loading…
Reference in New Issue