1

What is the best way to disable scaladoc / javadoc during Activator dist task.

I tried the following but it did not work

val genDocs: java.lang.Boolean = java.lang.Boolean.getBoolean(Option(System.getProperty("genDocs")).getOrElse("true"))

import scala.Boolean

publishArtifact in (Compile, packageDoc) := Boolean.unbox(genDocs)

publishArtifact in packageDoc := Boolean.unbox(genDocs)

publishArtifact in packageSrc := Boolean.unbox(genDocs)

I ran the dist as activator -DgenDocs=false dist but somehow it still tries to generate documentation.

Appreciate help

Reg Mem
  • 611
  • 1
  • 7
  • 19

1 Answers1

4

By default, the dist task will include the API documentation in the generated package. If this is not necessary, add these lines in build.sbt:

sources in (Compile, doc) := Seq.empty

publishArtifact in (Compile, packageDoc) := false

Taken from Play Framework documentation.

Sidorov Maxim
  • 131
  • 1
  • 5
  • I want to switch it on/off as command line parameter, I am not looking to hard code the `false` flag – Reg Mem Sep 21 '17 at 22:28