File tree 1 file changed +12
-3
lines changed
libs/scalalib/src/mill/scalalib
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
package mill .scalalib
2
- import mill ._
2
+ import mill .*
3
3
4
4
/**
5
5
* Mix this in to any [[ScalaModule ]] to provide a [[unidocSite ]] target that
@@ -19,6 +19,15 @@ trait UnidocModule extends ScalaModule {
19
19
allSourceFiles() ++ Task .traverse(moduleDeps)(_.allSourceFiles)().flatten
20
20
}
21
21
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
+ */
22
31
def unidocCommon (local : Boolean ) = Task .Anon {
23
32
24
33
val unidocSourceFiles0 = unidocSourceFiles()
@@ -30,7 +39,7 @@ trait UnidocModule extends ScalaModule {
30
39
// below is for scala-2 variant
31
40
val options : Seq [String ] = Seq (
32
41
" -doc-title" ,
33
- " Mill " ,
42
+ unidocDocumentTitle() ,
34
43
" -d" ,
35
44
Task .dest.toString,
36
45
" -classpath" ,
@@ -48,7 +57,7 @@ trait UnidocModule extends ScalaModule {
48
57
" -sourcepath" ,
49
58
Task .workspace.toString
50
59
)
51
- }
60
+ } ++ unidocOptions()
52
61
53
62
jvmWorker().worker().docJar(
54
63
scalaVersion(),
You can’t perform that action at this time.
0 commit comments