File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
libs/scalalib/src/mill/scalalib Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11package mill .scalalib
2- import mill ._
2+ import mill .*
33
44/**
55 * Mix this in to any [[ScalaModule ]] to provide a [[unidocSite ]] target that
@@ -19,6 +19,15 @@ trait UnidocModule extends ScalaModule {
1919 allSourceFiles() ++ Task .traverse(moduleDeps)(_.allSourceFiles)().flatten
2020 }
2121
22+ /** The title of the scaladoc site. */
23+ def unidocDocumentTitle : T [String ] = Task { " Mill" }
24+
25+ /** Extra options passed to scaladoc. */
26+ def unidocOptions : T [Seq [String ]] = Task { Seq .empty[String ] }
27+
28+ /**
29+ * @param local whether to use 'file://' as the `-doc-source-url`.
30+ */
2231 def unidocCommon (local : Boolean ) = Task .Anon {
2332
2433 val unidocSourceFiles0 = unidocSourceFiles()
@@ -30,7 +39,7 @@ trait UnidocModule extends ScalaModule {
3039 // below is for scala-2 variant
3140 val options : Seq [String ] = Seq (
3241 " -doc-title" ,
33- " Mill " ,
42+ unidocDocumentTitle() ,
3443 " -d" ,
3544 Task .dest.toString,
3645 " -classpath" ,
@@ -48,7 +57,7 @@ trait UnidocModule extends ScalaModule {
4857 " -sourcepath" ,
4958 Task .workspace.toString
5059 )
51- }
60+ } ++ unidocOptions()
5261
5362 jvmWorker().worker().docJar(
5463 scalaVersion(),
You can’t perform that action at this time.
0 commit comments